Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Mathematica Technical FAQs Services & Resources / Mathematica / Systems & Installation / Macintosh
-----
 /
OS X
*Mathematica
*Network Mathematica
*webMathematica
*gridMathematica
*Personal Grid Edition
*Wolfram Workbench
*Wolfram Education Group
*Application Packages
*Mathematica for Students
*Mathematica CalcCenter
*Publicon
*A New Kind of Science Explorer
*Mathematical Explorer
*Mathematica Teacher's Edition
*Calculus WIZ
*Mathematica Player
*Ask about this page
*Print this page
*Email this page
*Give us feedback
*
Sign up for our newsletter:

What can I do to prevent garbeled Japanese characters when I open a notebook file saved as HTML in TextEdit?

Instead of displaying the HTML code, TextEdit in Mac OS X will display an HTML document as the web page by default.

When Mathematica converts a notebook file to HTML (using File > Save As Special > HTML), the resulting HTML will not have the <meta> tags necessary to display Japanese characters. Japanese characters are therfore displayed incorrectly.

Depending on how you want to edit HTML documents, you can try one of the two workarounds:

If you wish to display HTML code:
1.

Start TextEdit.

2.

Select TextEdit > Preferences.

3.

In the section “Processing Rich Text”, check “Ignore Richtext commands in HTML.”

4.

You should now be able to edit the HTML code. (HTML is displayed as code.)

If you wish to display the file as a web page instead of HTML code:
1.

Do the same steps as above so that HTML document can be edited.

2.

Open HTML document, and add the following tag between <head> and </head>:

 

<meta http-equiv="Content-Type" content="text/html; charset=x-sjis">

 

For example,

 

<head> <meta http-equiv="Content-Type" content="text/html; charset=x-sjis"> <title> Japanese Character </title> </head>

3.

Uncheck “Ignore Richtext Commands in HTML” in the Preferences window. Then, HTML file should be displayed as a web page.

4.

Since TextEdit is not an editor for web document, it is not recommended for the use of viewing a web document for editing HTML document.

To edit HTML document in a text editor, we recommend you following the steps in the section “If you wish to display HTML codes”.

Download this FAQ as a Mathematica 5.2 Notebook






 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja]