We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20765
    • 90 Posts
    myfriendscallmebill Reply #1, 17 years, 8 months ago
    I am building a MODx site in English. And I need to add a few pages in Japanese.

    I have tried pasting Japanese into the document content, but after saving the document the Japanese characters have changed question marks.

    I have tried pasting a complete HTML page from a Japanese website into the document content and using a blank template. This doesn’t work either

    I have set the default character encoding to ISO-8859-1.

    Can anyone tell me how to incorporate a few Japanese pages into my English website?
      • 8382
      • 253 Posts
      Welcome, bill.

      If you don’t want change your MODx character code, you must write japanese articles with "Numeric Character Reference". Please see the HTML sourece of this page. "良くある質問" is represented by a following string, "& #33391;& #12367;& #12354;& #12427;& #36074;& #21839;". That is "Numeric Character Reference".
      There are many sites (for example, http://www.gakira.com/chinapage.htm) that you can convert to Numeric Character Reference online.
        • 20765
        • 90 Posts
        myfriendscallmebill Reply #3, 17 years, 8 months ago
        Thank you for your reply. Is there a MODx character code that is suitable for both English and Japanese?
          • 8382
          • 253 Posts
          I recommend unicode - "UTF-8".
          When you change the MODx encoding, you may be forced to change settings of MySQL. character-set-server, collation-server, etc.
          Please read http://dev.mysql.com/doc/refman/5.0/en/charset-syntax.html and http://dev.mysql.com/doc/refman/5.0/en/cjk-faq.html.
            • 20765
            • 90 Posts
            myfriendscallmebill Reply #5, 17 years, 8 months ago
            Thank you very much for these leads. I will follow up on them.

            Do you know if changing my site from it’s current ISO-8859-1 default encoding to UTF-8 is likely to affect the current English text I have in my site?
              • 8382
              • 253 Posts
              There will be no effect. wink
              But there are some points. You may have metatags with a charset attribute or xml:lang attribute in your templates. Those attributes must be replaced from "ISO-8859-1" "en_us" to "UTF-8" "ja", at your japanese documents.

              P.S.
              If you used Quickedit for editing a Japanese page, you had better change a following line too.

              line 36 assets/modules/quick_edit/lang/english.inc.php
              $_lang[’QE_charset’] = ’iso-8859-1’;