becoming

the trail of a family becoming

mysql 的亂碼問題

Horace 提及 mysql 中的亂碼問題。我不是這方面的專家,不過我的發現是若用上utf-8 為 mysql 的 charset 及 collations,而輸入時 WordPress 的 Options-> Reading -> Encoding for pages and feeds 為 UTF-8,中文顯示應是沒問題的。

不知其他人是否有這問題,但我所發現的是:當 mysql 的 charset 及 collations 是 utf-8,但 WordPress 的設定為 Big5,絕大部份的中文輸入是無問題的,但有些情況亂碼仍會出現。這可能是 big5 的 charset 中 有些 combinations 是 utf-8 所沒有的。於是當輸入 big5 characters 到一個以 utf-8 為 charset 及 collations 的 table 時,亂碼便(有可能)發生。

最理想當然是 mysql 和 wordpress 全用 utf-8。但我卻要將 blog 內的中文 posts 重新以 utf-8 輸入。很費時呢!

Filed by edmund at 1.10 pm under Tech |

No Comments

Reply to “mysql 的亂碼問題”