views:

21

answers:

1

The idea: I'm just trying to save some Chinese characters to a MySQL database.

The issue: apparently, some save while others don't. I've tried to just put em in via phpMyAdmin, but when I try to save them, they turn out to be question marks "?".

The query: UPDATE a9286500_chinese.chinese SET chinese = '贵' WHERE chinese.id =23 LIMIT 1 ;

The error: Warning: #1366 Incorrect string value: '\xE8\xB4\xB5' for column 'chinese' at row 1

The collation of the table is big5_chinese_ci.

Characters like 我 (wo) and 你 (ni) work, whereas characters like 贵 (gui) don't.

Thoughts?

A: 

That character (贵) is not encodable in Big5. If you need to handle both Simplified and Traditional Chinese, then you should use a Unicode encoding, like UTF-8.

JSON