bug-gnu-libiconv
[Top][All Lists]
Advanced

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

Re: [bug-gnu-libiconv] difference in iconv for EBCDIC SBCS conversion fr


From: Mike Fulton
Subject: Re: [bug-gnu-libiconv] difference in iconv for EBCDIC SBCS conversion from z/OS OS-provided iconv
Date: Mon, 3 Apr 2023 10:27:26 -0700



On Mon, Apr 3, 2023 at 3:26 AM Bruno Haible <bruno@clisp.org> wrote:
Mike Fulton wrote:
> Would it be possible to have either a compile-time configuration option
> like PCRE
> or an environment variable that we could have in the official code so that
> we don't
> end up with 2 copies of the code?

Indeed, there are dangers if the upstream and the downstream code diverge
too much.

I have thus implemented the environment variable approach:
https://git.savannah.gnu.org/gitweb/?p=libiconv.git;a=commit;h=19b6af5e5efe306bc1b2da87ba054b7391360ca2

> I really don't want z/OS to be
> 'different' and would
> like things to 'just work' for customers.

Your users will have set the ICONV_EBCDIC_ZOS_UNIX environment variable,
if and only if they work on files generated for/from the "z/OS Unix
System Services" (quoting the Unicode Standard, chapter 5).
Thank you! This is great.  Does this change also generate different TXT files for testing, e.g.
with my 'static patch', I had to do the following patch so that the 'check' test would pass.

diff --git a/tests/IBM-1047.TXT b/tests/IBM-1047.TXT
index d6818cf..9b3d02d 100644
--- a/tests/IBM-1047.TXT
+++ b/tests/IBM-1047.TXT
@@ -19,7 +19,7 @@
 0x12 0x0012
 0x13 0x0013
 0x14 0x009D
-0x15 0x0085
+0x15 0x000A
 0x16 0x0008
 0x17 0x0087
 0x18 0x0018
@@ -35,7 +35,7 @@
 0x22 0x0082
 0x23 0x0083
 0x24 0x0084
-0x25 0x000A
+0x25 0x0085
 0x26 0x0017
 0x27 0x001B
 0x28 0x0088


Bruno




reply via email to

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