edgreenberg has asked for the wisdom of the Perl Monks concerning the following question:
old:
perl.x86_64 4:5.8.8-43.el5_11
perl-DBD-MySQL.x86_64 3.0007-2.el5
perl-DBI.x86_64 1.52-2.el5
new:
perl.x86_64 4:5.10.1-141.el6
perl-DBD-MySQL.x86_64 4.013-3.el6
perl-DBI.x86_64 1.609-4.el6
All the perl-Unicode modules are installed.
Data passes over the wire from mysql with unicode in it. For instance, my e-acute comes over the wire as two bytes, 0xC3 0xA9.
On the old server, it is printed as two bytes. On the new server, it is printed as one byte: E9. On the new server perl's length function reports the string as having the correct number of characters as a one-byte character.
Printing the line with Encode::encode_utf8 causes it to come out correctly, but this requires combing a multitude of code to ad the encode_utf8 statement.
I tried adding mysql_enable_utf8 => 1 to the collection of options in the DBI->connect line, with no luck.
How can I avoid combing the code for places to add the encode_utf8 function.
Thanks,
Ed Greenberg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: UTF8 between versions
by graff (Chancellor) on Sep 29, 2015 at 03:05 UTC | |
by tye (Sage) on Sep 29, 2015 at 04:11 UTC | |
|
Re: UTF8 between versions
by Anonymous Monk on Sep 28, 2015 at 23:27 UTC |