|Perl Language Reference Manual|
by Larry Wall and others
Paperback (6"x9"), 724 pages
RRP £29.95 ($39.95)
Sales of this book support The Perl Foundation! Get a printed copy>>>
If you may assume POSIX (a rather large assumption), you may read more about the POSIX locale system from "Perl locale handling (internationalization and localization)" (perllocale) in the Perl Unicode and Locales Manual. The locale system at least attempts to make things a little bit more portable, or at least more convenient and native-friendly for non-English users. The system affects character sets and encoding, and date and time formatting--amongst other things.
If you really want to be international, you should consider Unicode. See "Perl Unicode introduction" (perluniintro) in the Perl Unicode and Locales Manual and "Unicode support in Perl" (perlunicode) in the Perl Unicode and Locales Manual for more information.
If you want to use non-ASCII bytes (outside the bytes 0x00..0x7f) in
the "source code" of your code, to be portable you have to be explicit
about what bytes they are. Someone might for example be using your
code under a UTF-8 locale, in which case random native bytes might be
illegal ("Malformed UTF-8 ...") This means that for example embedding
ISO 8859-1 bytes beyond 0x7f into your strings might cause trouble
later. If the bytes are native 8-bit bytes, you can use the
pragma. If the bytes are in a string (regular expression being a
curious string), you can often also use the
\xHH notation instead
of embedding the bytes as-is. (If you want to write your code in UTF-8,
you can use the
utf8 pragmata are
available since Perl 5.6.0.
|ISBN 9781906966027||Perl Language Reference Manual||See the print edition|