I am inserting data into a mysql table via perl. As far as my checks go, I do insert proper utf8 octets/flagged variables.
So far so good.
I am ssh'ed to the server, so I open mysql to manually check the result in the table. As expected the SELECT statement returns a listing where all umlauts are properly displayed.
But! When I use phpmyadmin to have a look at the exact same results set, I get ü for ü - although my phpmyadmin is set to utf8, my browser displays utf8 and the database has collation=utf8_general_ci on the table and the field.
Then I try my utf8 properly displaying cgi script and it behaves exactly like phpmyadmin, giving ü for ü.
As it seems something is mixed up with my MySQL input/output streams but I have to few knowledge of this to sort out what is wrong.
Is is possible to have utf8 data in a utf8 table, but the data is outputtet by mysql as latin1?
I found on another thread that posting my mysql environment variables might be of help:
| character_set_client | latin1
| character_set_connection | latin1
| character_set_database | latin1
| character_set_filesystem | binary
| character_set_results | latin1
| character_set_server | latin1
| character_set_system | utf8
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.