Comments (6)
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.
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.
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.
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.
From @ccw
from libiconvport.
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)
- installed code has library dependency to hardcoded zoslib directory HOT 5
- tests fail for the library code HOT 1
- generated file should be properly tagged with the right ccsid HOT 1
- Tag output stream from iconv __toCcsid() HOT 6
- iconv man page heading HOT 8
- iconv fails for conversion _from_ non ASCII when run under _bash_ HOT 14
- get check-ebcdic test running after merge HOT 1
- Invalid iconv output using echo? HOT 12
- Remove - and validate - environment variables being set in shell for libiconv
- iconv issue converting 1047 to 819
- Update stable release to include changes from DEV release
- Allow for "/ZOS_UNIX" in iconv_open to be activated via environment variable
- man page says Linux HOT 3
- Issue using the zoau e2a and a2e commands with libiconv (using altbin) HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libiconvport.