Skip Menu |

This queue is for tickets about the Locales CPAN distribution.

Report information
The Basics
Id: 47122
Status: resolved
Priority: 0/
Queue: Locales

People
Owner: Nobody in particular
Requestors: dmuey [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.07



Subject: broken names && function call that needs arg
assuming http header w/ utf-8 and HTML meta tag of same: for my $broken qw(am fr es) { Locales::Language::setLocale($broken); my $name = code2language($broken); } $name has "broken" characters. (Also _loadFallBackLocale; needs to be _loadFallBackLocale($caller);) line 121 Base.pm (elsehwere)
Actually this only happens to hash values, utf-8 layer on hashes? #!/usr/bin/perl use utf8; use CGI; my $cgi = CGI->new(); my $charset = 'utf-8'; # "latin1"; print $cgi->header('-charset'=>$charset); print qq{<html><head><META http-equiv="Content-Type" content="text/html; charset=$charset"></head><body>\n}; print "<p>Français</p><p>한국어</p>\n"; my %hash=("fr"=>"Français"); print "<p>HASH $hash{fr}</p>"; print "</body></html>\n";
Download Picture 847.png
image/png 4.6k
Picture 847.png
remove 'use utf8' and it works fine. Apparently "allow UTF-8 in the program text" really means identifiers and keywords but it is allowed already in strings...