language encoding in php data files
dmizer
Joined: 2008-10-08
Posts: 40 |
Posted: Wed, 2008-10-08 01:21 |
Please fill out the following form and take a look at the linked pages. The more information you supply, the better we can help you. Remove this FAQ information from your post before submitting.
More relevant information: I am attempting to convert my gallery from g1 to g2. Most of this has gone quite well; however, some of my comments have Japaense characters in them, and they are not showing up correctly in the description fields of g2. With a bit of research, I discovered that in my g1 album.dat files, the Japanese characters are showing up as raw code like so "福岡". Since I have a great number of pictures and comments with a load of Japanese, I would like to know if there's a way to convert the Japanese in the dat files so it will import to g2 correctly. Although there is probably a forum post about this somewhere, I was unable to find it. Edit: I have read this FAQ and added this line to my config.php
When I browse to the page, the browser is now selecting UTF-8 for the character encoding, but the Japanese is still not displaying. Edit: |
|
Posts: 40
Shameless bump. I have had zero luck with this.
I have tried manually converting the g1 php files to utf8 with the following command:
recode UTF-8 foo.dat
I have made sure that the entire database was set to utf8.
I have followed the directions here: http://dev.mysql.com/doc/refman/5.0/en/charset-conversion.html to make sure the entire database is correctly encoded.
Why will my Japanese not display correctly in Gallery 2, but it displays correctly in Gallery 1?
Posts: 40
I've discovered that something must be happening during the upload to the mysql database. When I import an album via the G2 admin panel, the Japanese displays correctly. After import, the Japanese does not display correctly.
Is there any more information I can provide to help solve this vexing problem?
Posts: 40
Okay ...
Here's the old gallery link (with how the text should appear):
New gallery link (with messed up text):
Key text is:
I've seriously given this my best shot here. Nothing I've found anywhere seems to address this particular problem.
Help ... please?
Posts: 40
Found the problem, don't know how to fix it.
The text in the mysql database is fine, and reads 福
But the page source shows that the "&" is '&' for syntactically valid xhtml. In order for the text to be read correctly, the & needs to be html literal, not xhtml. Is there a way I can get around this? This is happening somewhere in the gallery 2 code, not in the database.