[Catalyst] HTML::Widget and locale problems

fonseka at gmail.com fonseka at gmail.com
Sat May 20 20:17:14 CEST 2006


On 5/20/06, Andreas Marienborg <omega at palle.net> wrote:
>
> Its a problem with HTML::Element.


Thank you :)


if you look at the source, there is an _escape__xxx something method
>
> its too greedy, this works for me:
> sub _xml_escape {  # DESTRUCTIVE (a.k.a. "in-place")
>    foreach my $x (@_) {
>        $x =~ s~([<&>])~'&#'.(ord($1)).';'~seg;
>    }
>    return;
> }


Is there any easy way to override this thing?? I can't think of nothing but
dump HTML::Widget :(


andreas
>
>
> On 20. mai. 2006, at 19.48, fonseka at gmail.com wrote:
>
> > Hi there!
> >
> > I'm fetching data from a DBIC Pg UTF-8 DB, and constructing
> > HTML::Widget objects directly with the data I got from the DB.
> >
> > I used dumps in the middle of the code, and the data cames correctly
> > with all my locale characters (I'm portuguese).
> >
> > But then, when I print the form using result.as_xml, the locale data
> > becames escaped :(
> >
> > So instead of "Número" in the XHTML source i got "N&#195;&#186;mero".
> >
> > I tried playing with C::P::Unicode and with content-encoding, but
> > nothing helps...
> >
> > Can you help me?? Is there a way to HTML::Widget don't escape my
> > locale characters??
> >
> > --
> > Will work for bandwidth
> > _______________________________________________
> > Catalyst mailing list
> > Catalyst at lists.rawmode.org
> > http://lists.rawmode.org/mailman/listinfo/catalyst
>
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>



-- 
Will work for bandwidth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060520/b179684f/attachment-0001.htm 


More information about the Catalyst mailing list