PDA

View Full Version : Big MYSQL trouble.


mgrohan
09-12-2007, 02:50 AM
Been trying for over a week now to sort out mysql using Chinese.

By default all tables in mysql are latin1_swedish..

In the current set up you can enter everything in chinese fine, and it will show in mysql as gibberish, but the site appears fine.

I have gone about changing every instance of latin1_swedish to utf-8 in mysql. I have then tried to import a couple of tables in chinese utf-8.

Chinese is shown properly in mysql - great.

But them viewing the directory, the new items are just ???.

Therefore to my understanding i have all charset set to utf-8 in mysql.
Charset of my pages in phpld are all utf
Simplified Chinese has been on installation.

But it seems that the script is still expecting latin1_swedish from mysql. :confused::confused:

Any help would be greatly appreciated.

James
09-12-2007, 04:00 AM
Chinese is shown properly in mysql - great.

But them viewing the directory, the new items are just ???.
have you set the header for the correct one?? I am not mistaken
the best charset for chinese is not utf but

<LI class=me>GB2312 - simplified chinese (mainland)
<LI class=me>big5 - Traditional chinese (Hong Kong, Taiwan)
you can adjust these in the include/config.php


http://unicode.org/charts/unihan.html


it can be hit and miss using utf-8

mgrohan
09-12-2007, 05:27 AM
seems like if i import the sql through phpld admin it works ok.

In mysql it displays as gibberish, but in the directory it is ok.

Not ideal, but i guess i will need to do this unless anyone can offer any suggestions, as to how phpld connects to the database, converts and handles different charsets.

James
09-12-2007, 05:34 AM
charset is set in the include/config.php for the main part.

in admin the header is set in the /templates/Core/admin/main.tpl


If it is messing up when importing in phpmyadmin we cant really address it.

Sounds like phpLD works fine ?

mgrohan
09-12-2007, 05:38 AM
Like i said, it works.

But looking into mysql, it is all gibberish so everything needs to be done in phpld. this seems to be fine as the latest version of phpld the database preferences are very comprehensive.

Not perfect this way, but the job gets done :)

James
09-12-2007, 05:41 AM
did a little search and your not the first to have this problem

http://64.233.167.104/search?q=cache:CY1KXr0yLREJ:forums.mysql.com/read.php%3F52,157119,157119+phpmyadmin+shows+gibbe rish+in+the+tables&hl=en&ct=clnk&cd=4 (http://64.233.167.104/search?q=cache:CY1KXr0yLREJ:forums.mysql.com/read.php%3F52,157119,157119+phpmyadmin+shows+gibbe rish+in+the+tables&hl=en&ct=clnk&cd=4)