[Catalyst] Anyone have experience with locales?

Bill Moseley moseley at hank.org
Tue Dec 17 06:23:53 GMT 2013

I'm using the Catalyst plugin to support utf8 encoded input and output, I
have my database driver set to read in utf8, and I have Template Toolkit
configured for utf8 templates.

I want to use available locale to render numbers.   I'm using
Number::Format in a number of places and it works with POSIX's setlocale()

What I'm not clear on is if setlocale() plays nicely with everything above.
  Anyone here have experience with this?

http://perldoc.perl.org/perllocale.html#Unicode-and-UTF-8 says:

 It is strongly recommended that when combining Unicode and locale
(starting in v5.16), you use

   1.     use <http://perldoc.perl.org/functions/use.html> locale

When this form of the pragma is used, only the non-character portions of
locales are used by Perl, for exampleLC_NUMERIC . Perl assumes that you
have translated all the characters it is to operate on into Unicode
(actually the platform's native character set (ASCII or EBCDIC) plus
Unicode). For data in files, this can conveniently be done by also

For one thing I'm not using 5.16 yet - and I'm not clear what means for pre

Should I only use setlocale( &LC_NUMERIC, $locale ), for example?   That
is, using can setlocale( &LC_ALL, $locale ) cause problems with my existing
character handling?

-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20131216/f701d=

More information about the Catalyst mailing list