[html-formfu] catalyst, formfu and unicode

Jonas Alves jonas.alves at gmail.com
Sat Sep 29 00:55:59 GMT 2007


On 28/09/2007, Carl Franks <fireartist at gmail.com> wrote:
>
> On 27/09/2007, Jonas Alves <jonas.alves at gmail.com> wrote:
> >
> >
> > On 27/09/2007, Carl Franks <fireartist at gmail.com> wrote:
> > >
> > > If you find yourself having to remove Catalyst::Plugin::UTF8 or remove
> > > "use utf8" from modules with utf8 in the source - then there's
> > > something else going wrong.
> >
> > You just need the "use utf8" if you have utf8 characters in you source,
> like
> > the variables names.
> > If you just have utf8 characters in strings or other kind of data than
> you
> > don't need to use it.
>
> I don't think that's correct. - The following 3 manual pages all say
> you need to "use utf8" if you have UTF-8 in string constants / string
> literals.
> "source" doesn't just mean identifier / variable names.
>
> perluniintro
> Only one case remains where an explicit use utf8 is needed: if your
> Perl script itself is encoded in UTF-8, you can use UTF-8 in your
> identifier names, and in string and regular expression literals, by
> saying use utf8. This is not the default because scripts with legacy
> 8-bit data in them would break.
>
> perlunicode
> As a compatibility measure, the use utf8 pragma must be explicitly
> included to enable recognition of UTF-8 in the Perl scripts themselves
> (in string or regular expression literals, or in identifier names)
>
> utf8
> Bytes in the source text that have their high-bit set will be treated
> as being part of a literal UTF-X sequence. This includes most literals
> such as identifier names, string constants, and constant regular
> expression patterns.


Ok, I'm not an utf8 expert. But I never "use utf8" in my unicode
applications and if i always encode and decode the data correctly everything
is fine.
I'm pretty sure I've read somewhere that you just need the "use utf8" pragma
if you have utf8 characters in variables names. I don't remember where it
was so i can't say if it's correct.

-- =

Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20070929/53=
dbfba8/attachment.htm


More information about the HTML-FormFu mailing list