Jump to content

Recommended Posts

Hi  i recenty resaved a file in utf-8 so that i can have japanese text.

However, my php system seem to requires that my files remain in ANSI in order to work.

 

The error

 

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?

Link to comment
https://forums.phpfreaks.com/topic/201234-encoding-error/
Share on other sites

Quite a few ideas, depending on your situation. First:

 

http://support.mozilla.com/tiki-view_forum_thread.php?locale=eu&comments_parentId=88187&forumId=1

 

Next,

http://www.phpwact.org/php/i18n/charsets#checking_utf-8_for_well_formedness

 

Then adding the codes from this part (Headers must be before _any_ HTML output),

http://www.phpwact.org/php/i18n/charsets#practical_issues

 

Content encoding is an issue in PHP but can be handled when you know the qwerks.

 

-cb-

Link to comment
https://forums.phpfreaks.com/topic/201234-encoding-error/#findComment-1055749
Share on other sites

Thanks for you reply

 

I managed to display japanese characters that are hard coded in to the page

and get the shopping cart working with the file saved as utf8

 

but i dont seem to be able to retreive japanese from the database.

 

Ive tryed changing the collation of the field to ucs2_bin, ujis_japanese_ci, sjis_japanese_ci, cp932_japanese_ci

and this has had no effect.

 

Any ideas would be great?

Link to comment
https://forums.phpfreaks.com/topic/201234-encoding-error/#findComment-1057022
Share on other sites

I would personally encode the values of japanese characters before inserting them into the DB, then just decode them once they are out.

 

Messing with table encodings can be a real headache, especially for multiple languages (as you have, english and japanese), just stick to english and encode everything you cant natively support.

 

(This is obviously the lazy way, but effective - will perhaps cost space and performace, though hardly recognizable)

 

-cb-

Link to comment
https://forums.phpfreaks.com/topic/201234-encoding-error/#findComment-1057806
Share on other sites

Im not sure what you mean.

 

Why I stuck the charater in a normal TEXT field with the default collation the charater

just changed in ??????????????????????????????????

 

What do mean by encoding the everything thing i cant natively support?

 

Thanks for the imformative replay.

Link to comment
https://forums.phpfreaks.com/topic/201234-encoding-error/#findComment-1057843
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.