tallberg Posted May 6, 2010 Share Posted May 6, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/200880-utf8-php-and-japanese/ Share on other sites More sharing options...
Zyx Posted May 6, 2010 Share Posted May 6, 2010 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'); Quote Link to comment https://forums.phpfreaks.com/topic/200880-utf8-php-and-japanese/#findComment-1054064 Share on other sites More sharing options...
tallberg Posted May 10, 2010 Author Share Posted May 10, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/200880-utf8-php-and-japanese/#findComment-1055706 Share on other sites More sharing options...
satya61229 Posted May 10, 2010 Share Posted May 10, 2010 Not sure but please check you are using the right editor which understand the utf-8, utf-16. and if it understand then save it in right encoding also. Quote Link to comment https://forums.phpfreaks.com/topic/200880-utf8-php-and-japanese/#findComment-1055889 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.