Bug 1142540 - perl: json_pp mangles accented characters
perl: json_pp mangles accented characters
Status: NEW
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Current
x86-64 Other
: P5 - None : Minor (vote)
: ---
Assigned To: Michael Schröder
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-07-23 18:35 UTC by Stanislav Brabec
Modified: 2019-07-24 12:43 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Brabec 2019-07-23 18:35:32 UTC
While trying to use json_pp on openSUSE Tumbleweed, I got all accented characterd mangled. The tool erroneously hardcodes input encoding to ISO-8859-1 independently on locale.

How to reproduce:
sbrabec> echo '["é"]' | json_pp
[
   "é"
]
sbrabec> rpm -qf /usr/bin/json_pp 
perl-5.28.1-3.3.x86_64

All locales are properly and consistently set to cs_CZ.UTF-8.

Here is a probably related bug report with a fix:
https://github.com/makamaka/JSON-PP/issues/47

Work-around:
json_pp <list.json | iconv -f UTF-8 -t ISO-8859-1 >list-pp.json
Comment 1 Michael Schröder 2019-07-24 12:43:45 UTC
I'll fix this when we update the perl version in factory. The fix is already in perl master, commit 92050bba215a45f1b1af2343c99c36ab8bd642d7