Giter Site home page Giter Site logo

Comments (6)

MikeFultonDev avatar MikeFultonDev commented on August 24, 2024

I created a test (compconv.sh) for this.
The first problem hit is IBM-1047 to ISO8859-1:

cmp -l /tmp/zot.83891463.IBM-1047.txt /tmp/ibm.83891463.IBM-1047.txt
 21 205  12
 37  12 205

So code point 21 and code point 37 are being converted opposite from each other for the 2 'iconv' implementations.

from libiconvport.

MikeFultonDev avatar MikeFultonDev commented on August 24, 2024

Note cmp prints out values 'in octal', but the offset is in decimal, so the first line says:

byte number 21 (in decimal) has octal value 205 in the 'zot' file and has octal value 12 in the IBM file

from libiconvport.

MikeFultonDev avatar MikeFultonDev commented on August 24, 2024

I added a test for going the 'other' direction (ISO8859-1 to X). First problem hit for IBM-1047 is:

cmp -l /tmp/zot.67112607.IBM-1047.to.txt /tmp/ibm.67112607.IBM-1047.to.txt
133  25  45

from libiconvport.

MikeFultonDev avatar MikeFultonDev commented on August 24, 2024

Note the linefeed and newline is also an issue (already patched but perhaps needs something more. See Java dynamic option https://www.ibm.com/support/pages/apar/IV21473 (thanks @IgorTodorovskiIBM )

from libiconvport.

MikeFultonDev avatar MikeFultonDev commented on August 24, 2024

From @ccw

image

from libiconvport.

MikeFultonDev avatar MikeFultonDev commented on August 24, 2024

I switched to build from the dev line so that I could pick up a fix from Bruno Haible. We can now round-trip from ASCII to EBCDIC to ASCII and if we compare the z/OS Open Tools EBCDIC iconv translation to the IBM iconv translation, they are the same, BUT you have to specify the ICONV_EBCDIC_ZOS_UNIX environment variable to something (I chose 1). ICONV_EBCDIC_ZOS_UNIX is set in the .env for libiconv now so you will 'get it for free'
This change is made via PR #11 so this is now fixed (there is also a roundtrip.sh script in the 'tests' directory to verify this conversion is being done correctly.

Note there is a bug when using iconv command under bash converting from non-ISO8859-1 to another code page (see #12).

from libiconvport.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.