Re: z/OS, iconv, and gperf

2020-01-21 Thread Daniel Richard G.
Hi Bruno, On Sun, 2020 Jan 19 19:13-05:00, Bruno Haible wrote: > > OK, then we'll need > a) for the short-term: in lib/iconv_open.c, apply an EBCDIC -> ASCII > conversion to the 'from' and the 'to' strings. Can you implement that? > And also a rule that removes the anti-EBCDIC guard f

Re: z/OS, iconv, and gperf

2020-01-19 Thread Bruno Haible
Daniel Richard G. wrote: > But what good will that do, if the (ASCII-consuming) gperf code receives > e.g. the EBCDIC form of "ISO-8859-1"? "#pragma convert" only works at > compile time, not run time. OK, then we'll need a) for the short-term: in lib/iconv_open.c, apply an EBCDIC -> ASCII

Re: z/OS, iconv, and gperf

2020-01-19 Thread Daniel Richard G.
On Sun, 2020 Jan 19 16:59-05:00, Bruno Haible wrote: > > The intended outcome is that a gperf-generated mapping function, say, > for > FOO, "BAR" > performs equivalently to > if (strcmp (arg, "FOO") == 0) > return "BAR"; > just faster. Can you find the suitable compiler settings and

Re: z/OS, iconv, and gperf

2020-01-19 Thread Bruno Haible
Hi Daniel, > > > There isn't a way to compile gperf tables in an encoding-agnostic > > > manner? > > > > No. gperf works by using character values as indices into arrays; the > > arrays are filled by gperf at code generation time. > > > > Can you experiment with the pragmas to resolve this? For th

Re: z/OS, iconv, and gperf

2020-01-19 Thread Bruno Haible
Hi Daniel, > > Oh, certainly many of the IBM-nnn encodings are variants of what > > Microsoft and the rest of the world do regarding codepage nnn. Find an > > extensive comparison at > > https://haible.de/bruno/charsets/conversion-tables/index.html . > > > > You find the tools to extract the conve

Re: z/OS, iconv, and gperf

2020-01-08 Thread Daniel Richard G.
On Sat, 2019 Dec 21 00:49-05:00, Bruno Haible wrote: > > Oh, certainly many of the IBM-nnn encodings are variants of what > Microsoft and the rest of the world do regarding codepage nnn. Find an > extensive comparison at > https://haible.de/bruno/charsets/conversion-tables/index.html . > > You fin

Re: z/OS, iconv, and gperf

2019-12-20 Thread Bruno Haible
Hi Daniel, > > Thanks. From this, I think we can equate the following vendor names > > with GNU canonical names: > > Is there a good test to ensure that the conversions are as expected? I > wouldn't put it past IBM to use a strange variant of some of these otherwise- > familiar encodings... Oh,