MySQL Forums
Forum List  »  PHP

Re: Special characters and database
Posted by: Rick James
Date: March 14, 2009 01:56PM

Virtually all known languages (including Klingon) are representable in UTF-8.

You are missing SET NAMES utf8 right after connecting. (Maybe you have the settings buried somewhere.) But be cautious about simply adding that -- the Cyrillic in you tables may actually be double-encoded. Suggest you check by finding a short value in your database and
SELECT length(cell), char_length(cell), hex(cell) FROM tbl WHERE ...;
For Cyrillic properly encoded in utf8, I would expect length to be twice char_length since Cyrillic characters take 2 bytes each. (3 for Chinese, Japanese, and most other Asian character sets.)

Options: ReplyQuote


Subject
Written By
Posted
Re: Special characters and database
March 14, 2009 01:56PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.