Jump to content

encoding problem with multi-language website


stepanek

Recommended Posts

Hi to all,

 

I'm having big trouble getting a multi-language website working. The problem is that I can't get Czech, Romanian and Chinese to work within my custom cms. The characters do not show correctly eventhough they are correct in the database.

 

In the beginning, I couldn't even enter these into the database manualy without some specific characters getting messed up. This problem I tackled by changing the latin1_swedish_ci to utf8_bin and this seems to work fine.

 

Now my big problems are ;

 

1) somehow eventhough the text (characters) are in the database correctly and show correctly if I look through phpMyAdmin, they again show incorrectly when I call them up in my php file/website. (see attachments)

 

2) the same if I insert text through htmlArea editor, the text gets saved incorrectly.

 

Could someone tell me how to solve this problem?  Please let me know I'm completely lost on this one :(

 

Thanks,

 

Stepan

 

[attachment deleted by admin]

Link to comment
Share on other sites

this could be more that you don't have the character support on your machine...

 

 

 

hmmm... no, because in that case the text wouldn't show up correctly on other websites or documents....  

 

I think I might have it working now... for Czech language anyway, going to test Romanian and Chinese now.

 

(used the following ;

 

mysql_query("SET CHARACTER SET utf8");

mysql_query("SET NAMES utf8");

 

and in my html ;

 

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >

 

and database field(s) set to utf8-bin

 

hopefully this will work.

 

 

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.