in reply to Re^2: I'm having a lot of trouble getting UTF-8 output via Perl/DBI on OS X
in thread I'm having a lot of trouble getting UTF-8 output via Perl/DBI on OS X
Hello, Cody Fendant,roboticus.
PostgreSQL or MySQL seems to have encoding for server storage, and for client encoding. So, I guess 'select hex(field) from table' shows bytes for server storage and when you receive the value at the client, it is converted to encoding of client.
"mysql_enable_utf8=1" and "SET NAMES 'utf8'" sets encoding for client. I saw both of them gives me good result with DBD::mysql version "4.008".
In fact, I am not the man of MySQL... Please point me if I say wrong.
P.S: With my DBD::mysql version, the result is utf-8 bytes, not Perl's character. utf8::is_utf8 will tell you whether it is decoded character or bytes.