Skip to content

Commit

Permalink
Item13378: couple of patches from JozefMojzis for encoding issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Comment committed May 14, 2015
1 parent fd18802 commit a9a5f7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Expand Up @@ -313,11 +313,10 @@ my $Function = {
PERCENTILE => \&_PERCENTILE,
PI => sub { 3.1415926535897932384 },
PRODUCT => \&_PRODUCT,
PROPER => sub { # FIXME: I18N
my $rslt = lc( $_[0]);
$rslt =~ s/(^|[^a-z])([a-z])/$1 . uc($2)/ge;
return $rslt;
},
PROPER => sub {
$_[0] =~ s/(\w+)/\u\L$1/g;
return $_[0];
},
PROPERSPACE => sub { _properSpace($_[0]) },
RAND => sub {
my $max = _getNumber($_[0]);
Expand Down
2 changes: 1 addition & 1 deletion core/lib/Foswiki/I18N.pm
Expand Up @@ -339,7 +339,7 @@ sub _discover_languages {
foreach my $tag ( available_languages() ) {
my $h = Foswiki::I18N->get_handle($tag);
my $name = eval { $h->maketext("_language_name") } or next;
print LANGUAGE "$tag=$name\n" if $cache_open;
print LANGUAGE Encode::encode_utf8("$tag=$name\n") if $cache_open;

# Filter on enabled languages
next
Expand Down

0 comments on commit a9a5f7c

Please sign in to comment.