Giter Site home page Giter Site logo

libiconvport's Introduction

Automatic version updates

libiconv

GNU libiconv provides an implementation of the iconv() function and the iconv program for character set conversion. For use on systems which don't have one, or whose implementation cannot convert from/to Unicode.

libiconvport's People

Contributors

igortodorovskiibm avatar v1gnesh avatar harithaibm avatar

Watchers

 avatar  avatar

Forkers

harithaibm

libiconvport's Issues

iconv issue converting 1047 to 819

Commands used to convert the ebcdic file to ascii using iconv and and /bin/iconv
touch
chtag -tc ISO8859-1
iconv -f IBM-1047 -t ISO8859-1 $1.ebcdic >

t IBM-1047 T=on -rw-r----- 1 @02858 @ISSTC00 221 Feb 23 16:46 TBASVC_02132024.csv_GG
t ISO8859-1 T=on -rw-r----- 1 @02858 @ISSTC00 221 Feb 23 16:49 TBASVC_02132024.csv_GG.zopen_iconv
t ISO8859-1 T=on -rw-r----- 1 @02858 @ISSTC00 221 Feb 23 16:52 TBASVC_02132024.csv_GG.iconv

1047 file
bash-5.2$ cat TBASVC_02132024.csv_GG
"DATE","TRANNAME","CLIENTID","TBAIND","TBAS01","cputm","ttrans","cpuptrn","db2reqct","mqreqct",DB2/tran,SUs/tran,TotalCost
"12FEB24","ABCD",00000,999,"SERVICEABC",12445,428684,0.0290,375813738,249414,876.67,209.61,373.35

819 file using iconv
bash-5.2$ cat TBASVC_02132024.csv_GG.zopen_iconv
▒▒▒ႌ▒▒▒++▒(ႌ▒▒<▒▒+▒▒▒▒▒▒▒+▒▒▒▒됑▒▒▒▒▒▒▒_▒▒▒▒▒▒/>˂▒▒▒▒▒▒▒▒>▒▒▒▒▒▒▒▒▒Ȃ▒▒_▒▒▒▒▒Ȃ▒▒▒▒▒/>▒▒▒▒▒▒/>▒▒?▒/%▒?▒Ȏ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒䂌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒16:56:52 RC=(0) [SYSA] bash-5.2$

819 file using /bin/iconv
bash-5.2$ cat TBASVC_02132024.csv_GG.iconv
"DATE","TRANNAME","CLIENTID","TBAIND","TBAS01","cputm","ttrans","cpuptrn","db2reqct","mqreqct",DB2/tran,SUs/tran,TotalCost
"12FEB24","ABCD",00000,999,"SERVICEABC",12445,428684,0.0290,375813738,249414,876.67,209.61,373.35

Issue using the zoau e2a and a2e commands with libiconv (using altbin)

Running e2a and a2e using the default from and to parameters...
looks like files are being tagged without conversion.

[SYSA] bash-5.2$ which iconv
/hewitt/zopentools/zopen_repo/usr/local/altbin/iconv

[SYSA] bash-5.2$ iconv --version
iconv (GNU libiconv 1.17)

[SYSA] bash-5.2$ which e2a
/usr/lpp/IBM/zoau/v1r3/bin/e2a

[SYSA] bash-5.2$ which a2e
/usr/lpp/IBM/zoau/v1r3/bin/a2e

Invalid iconv output using echo?

What am I missing?
thanks

bash-5.2$ echo "A B C" | iconv -f ISO8859-1 -t IBM-1047
▒@▒@▒RC=(0) [SYSA] bash-5.2$ echo "A B C" | iconv -f ISO8859-1 -t IBM-1047 | od -hc
0000000 c140 c240 c315
301 @ 302 @ 303 025
0000006

--

bash-5.2$ echo "A B C" | od -hc
0000000 4120 4220 430a
A B C \n
0000006

bash-5.2$ echo "A B C" | iconv
A B C
bash-5.2$ echo "A B C" | iconv -f ISO8859-1
A B C
bash-5.2$ echo "A B C" | iconv -f ISO8859-1 -t ISO8859-1
A B C
bash-5.2$ echo "A B C" | iconv -f ISO8859-1 -t ISO8859-1 | od -hc
0000000 4120 4220 430a
A B C \n
0000006

generated file should be properly tagged with the right ccsid

If I iconv from ISO8859-1 to IBM-1047, it should tag the output stream as 1047 ccsid.
Same for all other CCSIDs supported by z/OS.

Question: what about CCSID's that iconv knows about but z/OS doesn't? Do those exist or is the ccsid field just a number that isn't validated?

This has been crudely done for just IBM-1047 but needs to be expanded.

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.