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.

Japanese characters not rendered in template window

November 08, 2009 1:55am

Subscribe [5]
  • #1 / Nov 08, 2009 1:55am

    MichaelWatt

    48 posts

    This question may be related to a resolved thread.

    I’d like to re-open the thread above if possible.

    I have EE set to UTF-8 but for some reason whenever I hit the “update” button on the template window, all content following a Japanese character is deleted.

    I have built Japanese websites on EE before but have never experienced this problem before.

    Suggestions?

    Thanks

  • #2 / Nov 08, 2009 2:24pm

    Greg Salt

    3988 posts

    Hi MichaelWatt,

    Which text formatting type are you using for this custom field?

    Cheers

    Greg

  • #3 / Nov 08, 2009 7:31pm

    MichaelWatt

    48 posts

    Hi Greg,

    The Japanese font is simply cut and paste into a template.
    I haven’t begun to build in the custom fields yet.

  • #4 / Nov 08, 2009 8:08pm

    Greg Salt

    3988 posts

    Hi MichaelWatt,

    Does the same text render properly if it’s copied and pasted into a normal static html file?

    Cheers

    Greg

  • #5 / Nov 08, 2009 8:38pm

    MichaelWatt

    48 posts

    Yes, it does.
    I have also, just now, tried to paste the code into EE’s static page option but the same thing happens. After I press “update” all content from and including the first Japanese character is deleted. (all content includes code and English text as well)

  • #6 / Nov 09, 2009 1:34am

    John Henry Donovan

    12339 posts

    Michael,

    It still sounds like a mod_security issue to me. What version and build of EE are you using?

    Can you attach a text file to your reply with what you are copying and pasting into the field so we can try and reproduce it?

  • #7 / Nov 09, 2009 2:28am

    MichaelWatt

    48 posts

    Thanks John,

    ExpressionEngine 1.6.8
    Build:  20091002

    I’m getting an error uploading a the text file (MIME format).
    Apologies in advance for displaying it below.
    Feel free to delete.

    The problem begins with the first kanji character in the “date”.

    {assign_variable:my_weblog="monologue"}
    {assign_variable:my_template_group="monologue"}
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html >
    
    <head>
    <title>TFSKK Magazine - Monologue</title>
    <meta http-equiv="Content-Type" content="text/html;charset="utf-8" />
    
    <link rel='stylesheet' type='text/css' media='all' href='{stylesheet=styles/base}' />
    <style type='text/css' media='screen'>@import "{stylesheet=styles/base}";</style>
    
    
    <link rel="shortcut icon" href="/images/favicon.ico" />
    <link rel="icon" href="/images/favicon.ico" />
    </head>
    
    
    
    <body>
    <div id="sandbox">
    
    {embed="includes/header"}
    
    <div id="content">
    <div class="main">
    
    
    <div class="row1">
    <div class="photo2">{site_url}images/monologue/photo2.jpg</div> 
    </div><!-- row1 -->
    
    
    <div class="article">
    <span class="author"><a href="#">Michael Watt - Web Specialist</a></span>
    <h1>The History of the Jack o Lantern</h1>
    <span class="date">2009年10月30日</span>
    
    ジャックランタン(Jack-o'-Lantern ジャック・オ・ランターン)は、アイルランド及びスコットランドに伝わる鬼火のような存在。名前は"ランタン持ちの男"の意。普通の火の玉の姿の他、光る衣装を身に纏うカボチャ頭の男の姿であらわれる事もある。
    
    生前に堕落した人生を送ったまま死んだ者の魂が、死後の世界への立ち入りを拒否され、悪魔からもらった石炭を火種にし、萎びて転がっていたカブをくりぬきそれを入れたランタンを、片手に持って彷徨っている姿だとされている(→ウィルオウィスプ)。また、悪賢い遊び人が悪魔を騙し、死んでも地獄に落ちないという契約を取り付けたが、死後、生前の行いの悪さから天国へいくことを拒否され悪魔との契約により地獄に行くこともできず、カブに憑依し安住の地を求めこの世を彷徨い続けている姿だともされている。
    
    この話がアメリカに伝わったのち、カブのランタンは、移民したアイルランド人によりアメリカでの生産が高かったカボチャのランタンに変化したが、スコットランドでは現在もカブ(ルタバガ)を使っている。この他、毎年10月31日のハロウィンの日に作るカボチャのロウソク立てをジャックランタンと呼び、善霊を引き寄せ、悪霊達を遠ざける効果があるといわれている。
    
    旅人を迷わせずに道案内をする事もあるという。
    
    </div>
    </div><!-- main -->
    
    
    
    <div class="right-col">
    <div class="right-banner"><a href="#">images/banner1.jpg</a></div>
    
    <div class="flap blogintro">
    The TFSKK Magazine is our online employee blog, written and produced by TFSKK employees. Take a break and enjoy the site.
    <a href="#">comments</a> ・ <a href="#">suggestions</a>
    </div>
    
    
    <div class="archives">
    <h2>Blog Archives</h2>
    <p><ul><br />
    <li><a href="#">The History of the Jack o Lantern</a></li><br />
    <li><a href="#">name of archived blog title</a></li><br />
    </ul></div></p>
    
    <p><div class="right-banner"><a href="#">images/banner-snowglobe.jpg</a></div><br />
    <div class="right-banner"><a href="#">images/banner-english.jpg</a></div><br />
    </div><!-- right-col --></p>
    
    
    
    <p><div class="footer2"><br />
    © <strong>2009</strong> Thermo Fisher Scientific KK<br />
    </div></p>
    
    <p><br clear="all" ><br />
    </div><!-- content --></p>
    
    <p> </p>
    
    <p></div><br />
    </body><br />
    </html>

  • #8 / Nov 09, 2009 5:39am

    Sue Crocker

    26054 posts

    Michael, I can’t replicate the problem you’re having on one of my sites.

    See the partial screen shot below.

    So it’s something on your end. As John mentioned, it’s probably a mod_security issue.

    If you make a test.html file based on this code, does it display correctly in your browser?

  • #9 / Nov 09, 2009 5:46am

    MichaelWatt

    48 posts

    Thanks Sue for your time on this. I’m glad it’s working on your end… and would be happier if it worked on my end.
    I always mock up my templates in static (X)HTML in Dreamweaver first to nail down the stylesheet and make sure the coding is solid in all browsers. From there I drag it into EE and add the machinery. When I look at the page in Static HTML, it looks fine.

    I’m ignorant about this mod_security issue.
    What is it exactly and how can I resolve it?

  • #10 / Nov 09, 2009 5:58am

    Sue Crocker

    26054 posts

    Info on mod_security

    I just queried in Google for mod_security disable and found this article. There are times when you can turn it off via .htaccess.

    I just thought of something.. if you save templates as files, and FTP up the template, do things display OK on the front end?

  • #11 / Nov 09, 2009 6:59am

    MichaelWatt

    48 posts

    I saved the template as an html file and uploaded like you requested.. and yes, it displays fine on the front end. But of course, this is a template with no Japanese in it.

    Just out of curiosity, I placed the same HTML code into a template on a second version of EE that I’m running for a client. When I hit the update button the Japanese content remains within the template as it should and renders fine. Very strange.

    I’ll check out the mod_security link that you sent me.

    Thanks again.
    Michael

  • #12 / Nov 09, 2009 9:14am

    Sue Crocker

    26054 posts

    Michael, are you familiar with using files with templates?

    EEDocs:// Flat File Templates

    This way, you’d do your template editing outside of EE. There would be the added step of having to FTP the template out to the site.

    Does that help?

  • #13 / Nov 09, 2009 7:58pm

    MichaelWatt

    48 posts

    Thanks Sue for the advice on Flat File Templates. I’ll give it a try once I sort out this Template window/Japanese content issue.

    The link that you offered concerning mod_security leads me to a EE login page with the following message “You are not authorized to perform this action”.

  • #14 / Nov 09, 2009 8:12pm

    Adam Dorsey

    1439 posts

    Sue’s link does indeed seem to be going to the wrong page. Try Googling “disable mod_security.”

    Unfortunately, we can’t recommend a particular method for disabling mod_security, as it will be host dependent.

    Try contacting your host or your server admin, and see if they can’t do this for you.

    -Adam

  • #15 / Nov 10, 2009 3:26am

    MichaelWatt

    48 posts

    Well I uploaded a .htaccess file into the root folder containing EE with the line of code to turn off mod_security. When I went to my EE login screen, I get a server error page.

    I also tried placing Japanese text into the default weblog that comes included on the EE installation. Again, as soon as I press the update button, any text/code after and including the the first japanese character is deleted.

    Maybe I should try to re-install EE?

    This is quite mind boggling.

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

ExpressionEngine News!

#eecms, #events, #releases