[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Perl 5.8 and UTF-8 locales



I am wondering whether I should reassign #164717 to perl.
Here is a small test:
  $ export LANG=en_US.utf8
  $ perl -MLocale::Language -e ''
  Malformed UTF-8 character (unexpected end of string) at /usr/share/perl/5.8.0/Locale/Language.pm line 115, <DATA> line 109.
  Malformed UTF-8 character (unexpected end of string) at /usr/share/perl/5.8.0/Locale/Language.pm line 117, <DATA> line 109.
  Malformed UTF-8 character (unexpected end of string) at /usr/share/perl/5.8.0/Locale/Language.pm line 115, <DATA> line 178.
  Malformed UTF-8 character (unexpected end of string) at /usr/share/perl/5.8.0/Locale/Language.pm line 117, <DATA> line 178.

Moreover the PERLIO environment variable does not seem to solve this problem
  $ PERLIO=raw perl -MLocale::Language -e ''
  Malformed UTF-8 character (unexpected end of string) at /usr/share/perl/5.8.0/Locale/Language.pm line 115, <DATA> line 109.
  [...]

Why does Perl force utf8 layer with UTF-8 locale?  Sounds silly to me.
Is there a way to disable this layer? (other than changing locale ;))

Denis



Reply to: