PDA

View Full Version : Charset error after upgrade


see_why_you
1-19-05, 08:14 AM
After the server upgrade I am having problems creating new records with chinese char strings.

I had a quick discussion with the 1-1 chat site op and we studied a few forum posts and MySQL documents, but still cannot fix my problem. :(

I come across this documentation in MySQL http://dev.mysql.com/doc/mysql/en/Charset-MySQL.html and it appears that I will need the charset big5 with collation big5_chinese_ci for my chinese pages to work agian. This does not seem to be available after the upgrade.

Does anyone have similar problem? or just anything to shine some lights on how to fix this? :confused:

Currently my page is filled with ??? and trust me, it's not a pretty sight/site!!!! :eek: :eek: :eek: :eek:

Thanks in advance.

HalfaBee
1-19-05, 08:41 AM
I would suggest you try http://phpmyadmin.powweb.com and check the collation col. of your DB is set to the correct language.

see_why_you
1-19-05, 06:07 PM
Thanks HalfaBee.

Sorry it wasn't clear but this is what Iam saying, the collation I need is big5_chinese_ci but it is not available on the list.

If anyone knows what other collation is compatible for big5 chinese characters please let me know. From what I see in the available list is mainly european lauguages, not asian.

mjp
1-19-05, 06:18 PM
If you get a you get a "table not found error" you may have to do some tweaking to your database, as character support has changed in MySQL 4.1:
http://dev.mysql.com/doc/mysql/en/Upgrading-from-4.0.html
http://dev.mysql.com/doc/mysql/en/Charset-conversion.html

see_why_you
1-19-05, 08:37 PM
Thanks mjp. but no, I am not getting the table not found error.

The tables are fine, the old records are fine. But when I create new records, it cannot save my chinese text but "???" or monster code instead.

More ideas?

evaland
1-21-05, 08:36 AM
I also have the error

text but "???" or monster code instead

the support of powweb please must help this error

maso
4-23-05, 12:08 AM
me too
text but "???" or monster code instead
the support of powweb please must help this error

yanfeng
4-30-05, 02:40 AM
I am migrating from other host, have the same problem.
The charset of my database is utf-8. After setting collation to utf8-general-ci, I can restore the data base correctly.
The content can be shown readable in phpmyadmin, but on webpage they become ???s. I use WordPress.
Look forward your ideas?

Dan Lu
7-17-05, 05:58 AM
I met the same problem. No solution?
It's strange!
I find the "big5_chinese_ci ", but still don't work.
One another hosting, there is "Big5" language selection in phpMyAdmin 2.61,
and it works well.

Dan Lu
7-28-05, 08:26 AM
mmmh..
May I ask hosting master add the language Big5 for Big5 user?

haihaowu
8-3-05, 03:56 PM
I encountered the exact same problem as yanfeng described when migrating my wordpress website. And then I found the solution at yanfeng's website. http://yanfeng.org/blog/585/ It's in Chinese. I translate it here:

To solve this problem, the wp-includes/wp-db.php has to be modified. Add the line
$this->query(”SET NAMES ‘utf8′”);
right after
$this->dbh = @mysql_connect($dbhost,$dbuser,$dbpassword);
so the resulting code should be:

$this->dbh = @mysql_connect($dbhost,$dbuser,$dbpassword);
//add this line
$this->query(”SET NAMES ‘utf8′”);

coolnalu
8-9-05, 04:26 AM
Parse error: parse error, unexpected T_STRING in /home/cuaut2/public_html/blogs/wp-includes/wp-db.php on line 44

Got this error.

what to do?

on line 44 is $this->query(”SET NAMES ‘utf8′”);

IanS
8-9-05, 05:26 AM
Parse error: parse error, unexpected T_STRING in /home/cuaut2/public_html/blogs/wp-includes/wp-db.php on line 44

Got this error.

what to do?

on line 44 is $this->query(”SET NAMES ‘utf8′”);The string quoted doesn't look like it's from a powweb installation. Powweb doesn't use home or public_html - check that you've installed the application correctly and supplied paths correctly for a powweb installation.