Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: HTML::Entities and multi-byte characters

by iburrell (Chaplain)
on Sep 13, 2004 at 22:07 UTC ( [id://390678] : note . print w/replies, xml ) Need Help??


in reply to Re^2: HTML::Entities and multi-byte characters
in thread HTML::Entities and multi-byte characters

You probably will have to make a Unicode string from strings that come from the database.

Some drivers (DBD::Pg) will flag strings as Unicode. I don't know if DBD::mysql supports this. I have seen three different ways to control the encoding of strings. DBD::Pg has a dbh property, DBD::Oracle uses the NLS_LANG environment variable, and some use the database encoding. Unfortunately, it is not something that is well documented.

  • Comment on Re^3: HTML::Entities and multi-byte characters

Replies are listed 'Best First'.
Re^4: HTML::Entities and multi-byte characters
by bpphillips (Friar) on Sep 14, 2004 at 14:31 UTC
    I did a bit of googling and discovered that DBD::mysql doesn't support this but I found there's some ongoing discussion of how it should be emulated: Google Groups Thread. We use our own simple DBH abstraction layer so I might just add functionality at that level to do the decode_utf8() conversion...