in reply to Re: Re: Encoding of DBI PostgreSQL output
in thread Encoding of DBI PostgreSQL output
Whoa! Now that's a symptom of something gone awry in your interpretation of the data.
I'll bet that the intended string, dumped out as octets rather than as 16-bit "words", would be:
Note that your 16-bit rendering makes it look like there are at least two errors in the string; shuffling the bytes back to their true order makes both problems go away.69 64 20 c3 96 73 74 6c i d <sp> <U00D6> s t l O-umlaut
When you handle utf8 data a utf8 string as binary data, ALWAYS treat it as bytes, NEVER as 16-bit words. (update: when handling a utf8 string in perl 5.6 or later as a perl-internal unicode character string, you will of course treat it as characters, and you'll stop thinking in terms of bytes.) This will save you from byte-order issues, which are obviously coming into play here. It's an intrinsic part of utf8's design.
|
|---|