Re: [Maypole-dev] UTF-8 problem with Maypole and Class::DBI::AsForm / HTML::Element

From: Kester Habermann (kester.habermann at gmail.com)
Date: Tue Dec 14 2004 - 23:43:46 GMT


Hi Simon,

On Tue, 14 Dec 2004 23:31:50 +0000, Simon Flack <sf at flacks.net> wrote:
 
> utf8 is a lexical pragma that tells perl that the source code is utf8,
> so in your example, that string ("À") has its utf8 flag on.
>
> This also works without utf8.pm:
>
> use HTML::Element;
> print HTML::Element->new("textarea", name => "lala")
> ->push_content(chr(228))->as_XML;
> <textarea name="lala">&#228;</textarea>
>
> Are you sure the value you're getting back from the database is
> correctly encoded?

chr(228) is latin1 and not utf8. I need it to work with the two-byte
utf-8 sequence.
I'll write a test-program that reads the value from the database. A
select showed me that the two-byte sequence is stored in the
database.

> Simon

Regards, Kester.



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT