Jump to content

utf8 php and japanese


tallberg

Recommended Posts

Hi

 

Im trying to convert a site into japanese.

I found out that if the php page is in uft8 then it will display the charecters.

However, when i convert my php page with a shopping cart and other related functions

I get the errror message

 

Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

 

Any ideas how i can retain my php functionality and use utf8 to display japanese?

Link to comment
Share on other sites

For such languages as Chinese or Japanese, UTF-8 is not an optimal encoding, as it is optimized for displaying primarily latin characters. I would recommend using UTF-16. Note that you must inform the browser in a HTTP header that you are using this encoding. META tag is not enough:

 

header('Content-type: text/html;charset=utf-16');

Link to comment
Share on other sites

Thank you for your reply.

 

Ive put header('Content-type: text/html;charset=utf-16'); in and changed the meta tag

and now the japanese displays but all the mark up is lost.

It looks like the mark up is being converted into japanese.

 

Any ideas?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.