I got the database data to display correctly in browsers after decoding the data:
use Encode; decode_utf8($db_data);
But, is this really the way to go? It feels like tha data in the database is still latin1 and that I have to do something with the data instead?
I ran some test suggested elesewhere:
#1 - USE MySQL CHAR_LENGTH TO FIND ROWS WITH MULTI-BYTE CHARACTERS: SELECT CLUB_NAME FROM SUME_CLUB_TMP WHERE LENGTH( CLUB_NAME ) != CHAR_LENGTH( CLUB_NAME ) Result -------------- Törstar #2 - USE MySQL HEX and Perl bin2hex SELECT CLUB_NAME, HEX(CLUB_NAME) FROM SUME_CLUB_TMP Database --------- törstar 74C3B67273746172 Perl bin2hex --------- 74f67273746172 törstar #3 - SEE IT IN BOTH ENCODINGS SET CLUB_NAME latin1; SELECT CLUB_NAME, HEX(CLUB_NAME) FROM SUME_CLUB_TMP; A databasecall in perl - utf8 --------- törstar 74C3B67273746172 A databasecall in perl - latin1 --------- törstar 74C3B67273746172
In reply to Re^7: UTF-8 webpage output from MySQL
by boboson
in thread UTF-8 webpage output from MySQL
by boboson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |