How to use UTF-8 with Movable Type

Here’s what I did to display UTF-8 with Movable Type.

  1. mf.cfg : Set PublishCharset to UTF-8.
  2. mf.cfg : Set NoHTMLEntities to 1 (remove comment #)
  3. 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.
  4. 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.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *