On Mon, Jun 16, 2003 at 10:16:33AM -0400, Mark Lewellen wrote:
> I had the same problem, and worked around it by using _utf8_on() from
> Encode on the mysql query results.
I tried that, but it doesn't help.
> Also, as a suggestion to the authors/documentors of Encode: it would
> be helpful to have more explanation of (& warnings about) the UTF-8
> flag, how/why it works, functions that manipulate it, and warnings about
> common problems, such as the current one.
I also tried decode("utf8", $octets, Encode::FB_CROAK );
which should die with an error message if it encounters if $octets
contains incorrect utf8. it never dies, just gives me an empty string.
somebody pointed out to me that mysql is messing with my bits:
> > the string i write into the db is 6 characters long:
> > "ABc\N{greek:alpha}\x{00df}\N{cyrillic:e}"
[...]
> > cyrrillic e 044D 1101000110001101
[...]
> > what i get back from the db is
[...]
> > ? 11010001
> > ? 00111111
> >
so I'm looking into that right now. so far i've found out that
mysql doesn't mess with greek letters ;-)
but that still leaves the question: how do i handle malformed utf8 ?
and why isn't decode("utf8", $octets, Encode::FB_CROAK ); giving
me an error message?
--
Brigitte 'I never met a chocolate I didnt like' Jellinek
[EMAIL PROTECTED] http://www.horus.at/~bjelli
http://perlwelt.horus.at http://www.perlmonks.org/index.pl?node=bjelli