MySQL Forums
Forum List  »  PHP

Re: Windows: problem with unicode after update
Posted by: Rick James
Date: December 17, 2013 05:08PM

Alas, there are many things that could be wrong...
* The data could have been garbled as it was _stored_ into the database.
* The reading of the data could be garbling it.
* The web server / browser could be at fault.
* Word may have messed things up.

What is needed is for _every_ step to be thinking utf8. If any step(s) are not, then garbling occurs.

Do the SELECT HEX... suggestions in
http://mysql.rjweb.org/doc.php/charcoll
to see if the data was garbled as it was stored. If it is bad, then it could be Word, PHP, and/or the table definition.

SHOW CREATE TABLE -- this should say utf8. (But changing it is probably not sufficient.)

> Unfortunately mysql_set_charset('utf8'); didn't do the trick.

As I am saying, that is just one piece of the messy puzzle.

> but all records with unicode characters are missing on the php page (just blank spots, the whole record is missing, not only the unicode characters)

Please clarify. Does it look like text was truncated at the accented letter? For example, does "Bergér" show as "Berg" ? If so, that _probably_ indicates that you had non-utf8 bytes in PHP when trying to INSERT them into the table.

Go through all the steps -- source of data, PHP, database table, read back via PHP, and browser. Dump the HEX wherever you can. This will help pin down where the problem(s) is.

Options: ReplyQuote


Subject
Written By
Posted
Re: Windows: problem with unicode after update
December 17, 2013 05:08PM


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.