Bug#570280: libjson-perl: umlauts problem

Thomas Mueller thomas at chaschperli.ch
Wed Feb 17 20:04:53 UTC 2010


Package: libjson-perl
Version: 2.17-1
Severity: normal

hi

seems that JSON is not "restoring" umlauts correctly. tried to use a symfony json service. for example I got "\x{f6}" instead of "ö". symfony/php sends it "ascii" encoded. decoding the same json stream with php json was no problem.

tried to track down the problem. could reproduce it in perl with this script:

---

use JSON;
use Data::Dumper;
use Encode;
use utf8;

my $json = JSON->new();
$json->ascii;
$json->pretty;

$string = { test2 => "ö"};

$encoded = $json->encode($string);
$decoded = $json->decode($encoded);

print $encoded;
print Dumper($decoded);

---


output is:

{
   "test2" : "\u00f6"
}
$VAR1 = {
          'test2' => "\x{f6}"
        };



-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental'), (1, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libjson-perl depends on:
ii  perl                          5.10.1-9   Larry Wall's Practical Extraction 

Versions of packages libjson-perl recommends:
ii  libjson-xs-perl               2.270-1    module for serializing/deserializi

libjson-perl suggests no packages.

-- no debconf information





More information about the pkg-perl-maintainers mailing list