Description of problem:
Not possible to encode/decode the character sets IBM-858 (file coming from a IBM Zos) with iconv
Version-Release number of selected component (if applicable):
The closest charset is CP850, but it doesn't have the euro character EURO (€).
perl-Text-Iconv provides only a Perl interface to the iconv() function.
iconv is part of glibc-common.
# rpm -qf /usr/bin/iconv
We now have IBM858 upstream thanks to the Red Hat i18n team (Mike Fabian).
Author: Mike FABIAN <email@example.com>
Date: Thu Sep 7 15:28:28 2017 +0200
Add new codepage charmaps/IBM858 [BZ #21084]
This code page is identical to code page 850 except that X'D5'
has been changed from LI61 (dotless i) to SC20 (euro symbol).
The code points from /x01 to /x1f in the /localedata/charmaps/IBM858
file have the same mapping as those in localedata/charmaps/ANSI_X3.4-1968.
That means they disagree with with
in that range.
For example, localedata/charmaps/IBM858 and localedata/charmaps/ANSI_X3.4-1968 have:
“<U0001> /x01 START OF HEADING (SOH)”
whereas CP00858.txt has:
“01 SS000000 Smiling Face”
That means that CP00858.txt is not really ASCII-compatible and to make
it ASCII-compatible we deviate fro CP00858.txt in the code points from /x01
* benchtests/strcoll-inputs/filelist#en_US.UTF-8: Add IBM858 and ibm858.c.
* iconvdata/Makefile: Add IBM858.
* iconvdata/gconv-modules: Add IBM858.
* iconvdata/ibm858.c: New file.
* iconvdata/tst-tables.sh: Add IBM858
* localedata/charmaps/IBM858: New file.
This is already fixed in RHEL 8.0 so no need to backport there.
IBM858 is almost identical to IBM850 except for the inclusion of Euro sign.
Here are a couple of tests to verify that the character encoding is supported and works:
echo -e '\xd5' | iconv -f IBM858 -t UTF-8
# should generate a UTF-8 "Euro" sign
echo -en '\xe2\x82\xac' | iconv -f UTF-8 -t IBM858 > ibm858.euro
# should generate a single byte 'ibm858.euro' file with content 'd5'
Verified with iconv
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.