Bart Lateur wrote:

On Wed, 10 Sep 2003 08:33:03 +0100, Steve Hay wrote:



And when I retrieve the data (again without conversion) I just get octet sequences into my Perl scalars - not flagged, UTF-8 character strings as I would like.



If you're *sure* that this is UTF-8, only perl doesn't flag it as such, you can set the flag yourself. In perl 5.8.x, you can use the Encode module, one of the functions documented near the bottom, here the _utf8_on(STRING). That's an inplace modifying function, so you use it like

_utf8_on($string_that_should_be_utf8);

Yep, that's an alternative to the "$now_is_utf8 = Encode::decode_utf8($should_be_utf8)" call that I described in my original posting.

But the question was: How can I arrange for such conversions to be performed automatically by DBI whenever it receives or returns data?

- Steve



Reply via email to