How to use UTF-8 with Movable Type
Here’s what I did to display UTF-8 with Movable Type.
- mf.cfg : Set PublishCharset to UTF-8.
- mf.cfg : Set NoHTMLEntities to 1 (remove comment #)
- lib/MT/default-templates.pl : Replace all the “iso-8859-1″ entities to “utf-8.” You should do this before you edit templetes because its charset will be applied to templetes after you rebuild.
- extlib/CGI.pm : Replace “ISO-8859-1″ entity of line 376 to “UTF-8″. There are several “ISO-8859-1″ entities in it, but I just did for that one line, which is below commented “safe ISO-8859-1 something”.
Below the additional modification
- Modify font family/font size in styles.css. Probably you need to do this if you use CJK environment for readability.
That’s it! I hope Movable Type use UTF-8 for its default charsert someday.
FYI: Currently, seems Blogger doesn’t support UTF-8, but you can use non-latin languages to modify its templete file, just replace “ISO-8859-1″ entity in its templete to charset you use. e.g. “SHIFT-JIS” for Japanese.
About this entry
You’re currently reading “How to use UTF-8 with Movable Type,” an entry on Ecrits IV
- Published:
- 12.9.02 / 9am
- Category:
- Hack
- Tags:
No comments
Jump to comment form | comments rss [?] | trackback uri [?]