MySQL 4.1.x 編碼問題(UTF8)

剛剛寫code發現在phpMyAdmin裡面的中文看起來非常正常 不過程式print 卻都是亂碼,很怪!! 後來google 了一下,發現是
有 SUPER 權限的 user 在連線的時候不會去執行 init_connect

所以說即使我的 init_connect=’SET NAMES utf8′ 還是沒用
因為我db是用root連的……….
所以才會是亂碼~~ :*-):
直接去開了一個新帳號來用就好了。

ref.

MySQL 4.1.x SET NAMES UTF8

About johnpupu

..........
This entry was posted in MySQL and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word