ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Shift_jis encoding changing to Unicode in expression engine!!!

July 14, 2010 11:27pm

Subscribe [3]
  • #1 / Jul 14, 2010 11:27pm

    jsks16

    31 posts

    Ok I am having a serious problem.  My client’s Japanese page is encoded in shift_jis. I have the doctype set correctly, and it works perfectly find on the static pages.  However when I copy and paste the same working code into expression engine, it is not encoding into Shift_jis.  Rather it is encoding everything into unicode, and I am getting garbage instead of Japanese unless I change my browser to Unicode.

      Personally I prefer unicode, but it never seems to work well on my clients japanese computers so they want shift_jis

    what can i do to make sure my japanese pages are displaying in the correct format?

  • #2 / Jul 15, 2010 5:43am

    John Henry Donovan

    12339 posts

    jsks16,

    What’s in the header of your template in EE?
    Have you got a link to one of these pages?

  • #3 / Jul 15, 2010 9:12am

    jsks16

    31 posts

    jsks16,

    What’s in the header of your template in EE?
    Have you got a link to one of these pages?

    Thanks for the reply John.  Unfortunately everything we have is still in development so I cant share the link until the site is open.

    The header is

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html ><!-- InstanceBegin template="/Templates/basic-event.dwt" codeOutsideHTMLIsLocked="false" --> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=shift_jis" />

    This was provided my my japanese coworker.  It looks fine on the static page, but it doesn’t seem to render in EE.

    I changed it to

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html > 
    <head> 
    
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    and the utf-8 seems to work well with my computer, but my coworkers sometimes have problems with it. 

    It may not even be an EE problem at all, but a problem in the cutting and pasting of the code from the static page to the EE page… I dont know for certain.

  • #4 / Jul 15, 2010 9:29am

    Ingmar

    29245 posts

    You’re having encoding issues here. It’s important that you use the same encoding for both your EE control panel as well as the public site. I really do recommend using UTF-8 for that, but if you insist on using shift_jis you must set your Default Character Set to it, too, ensuring that your CP actually encodes them correctly.

    I have no experience with Japanese myself, but perhaps you could ask the guys over at http://expression-engine.jp? I’m sure they have a few handy tips.

  • #5 / Jul 15, 2010 9:41am

    jsks16

    31 posts

    You’re having encoding issues here. It’s important that you use the same encoding for both your EE control panel as well as the public site. I really do recommend using UTF-8 for that, but if you insist on using shift_jis you must set your Default Character Set to it, too, ensuring that your CP actually encodes them correctly.

    I have no experience with Japanese myself, but perhaps you could ask the guys over at http://expression-engine.jp? I’m sure they have a few handy tips.

    Thanks again

    I perfer utf-8 too!  It is so much easier to work with.  Shift_jis was developed in part my microsoft and has a few of those MS issues…

    But I will check the japanese page too.  thanks again

  • #6 / Jul 15, 2010 9:44am

    Ingmar

    29245 posts

    Sounds good. Please let us know in case there’s anything else we can do for you.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases