Home » Internationalization » Translation2 » Bug #9239
Documentation for Database Containers - encoding
Details
| Doc Bug #9239 | Documentation for Database Containers - encoding |
|---|---|
| Submitted | 2006-11-05 20:28 UTC |
| From | pearbugs2006 at reddreamer dot com |
| Assigned | quipo |
| Status | Closed |
| Package | Translation2 |
| PHP Version | Irrelevant |
| OS | Ubuntu Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-11-05 20:28 UTC] pearbugs2006 at reddreamer dot com
Description:
------------
It took me several hours to figure out that I couldn't display Chinese text because the "encoding" entry in the database (MySQL, through MDB2) was "utf-8" instead of "utf8". Evidently the valid values for that column are what would be used in a MySQL "SET CHARACTER ENCODING" query? (As opposed to the values for HTTP or anything else I tried.)
Once I got to the point of coding the mysql queries myself, I noticed that the native driver does throw errors when I use "utf-8"... so maybe you guys are trapping or otherwise eating those errors without re-throwing them? They'd have been very useful for debugging.
More documentation on the database in general would be good, and maybe some links between the package documentation and the section of the PEAR manual covering it, since they aren't identical.
[2006-11-05 21:08 UTC] pearbugs2006 at reddreamer dot com
Arrgh, that doesn't seem to have fixed the problem after all. Something must have been cached somewhere, because evidently the reason I can now see the Chinese text is because I switched to the XML container several debugging steps back. If I go back to MDB2 I'm back to seeing question marks in place of any Chinese displayed.
If I echo some Chinese characters right from my PHP code, they show up properly. It's only stuff that's passed through Translation2 that gets converted to question marks. I've tried using the UTF-8 decorator and a bunch of other things and haven't gotten anywhere.
The amount of difficulty I'm having with this is especially aggravating because phpmyadmin just displays the Chinese, when I browse the tables, without me having to do anything special.