[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: z/OS, iconv, and charset aliases

From: Daniel Richard G.
Subject: Re: z/OS, iconv, and charset aliases
Date: Thu, 19 Dec 2019 23:38:31 -0500
User-agent: Cyrus-JMAP/3.1.7-694-gd5bab98-fmstable-20191218v1

On Thu, 2019 Dec 19 00:16-05:00, Bruno Haible wrote:
> Hi Daniel,
> In <https://lists.gnu.org/archive/html/bug-gnulib/2015-10/msg00020.html>
> you submitted this patch, which Paul committed on 2016-08-18:
> > Also, iconv_open() on
> > z/OS does not recognize "ISO-8859-1", but "ISO8859-1" works.
> [...]
> This part is not right. The approach we take regarding charset/encoding
> aliases is that
>   - locale_charset() produces canonicalized charset names
>     (see localcharset.h for the precise list, e.g. "UTF-8" not "UTF8",
>     "ISO-8859-1" not "ISO8859-1", "CP1252" not "WINDOWS-1252", etc.),
>   - glibc is known to support these canonicalized charset names,
>   - All functions are supposed to receive canonical, not system-dependent
>     charset names.


> In particular, the gnulib iconv_open module is supposed to receive an
> encoding name such as "ISO-8859-1" as argument and, on platforms which
> don't understand it, pass "ISO8859-1" (on whatever the platform likes)
> to the platform's iconv_open() function. The way this is done is by
> adding a gperf-syntax data file to the 'iconv_open' module. To create
> such a file, I would need from you the list of encoding names, as z/OS
> lists them. You can also take lib/iconv_open-aix.gperf as a template.

I've attached a file with the output of "iconv -l". The names appear 
consistent with what's in iconv_open-aix.gperf.

> Packages such gettext are passing an encoding name "ISO-8859-1" to
> iconv_open, and the unit test is supposed to verify that this works.
> 2019-12-19  Bruno Haible  <address@hidden>
>       iconv tests: Test canonicalized, not system-dependent, encoding names.
>       * tests/test-iconv.c (main): Revert part of the 2016-08-17 patch.

So *that's* why test-iconv was breaking for me again :]


Daniel Richard G. || address@hidden
My ASCII-art .sig got a bad case of Times New Roman.

Attachment: zos-iconv-output.txt
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]