|
How can I convert UCS2 to code page 037 and then from code page 037 to UCS2? Any examples?
UCS2 is CCSID 13488 (more or less) on the iSeries. So you can do this: D input1 s 50A D output1 s 50C CCSID(13488) D input2 s 50C CCSID(13488) D output2 s 50A /free // from the job CCSID to UCS2 Input1 = 'Nows the time for all good men'; Output1 = %ucs2(Input1); // from UCS2 to the Job CCSID input2 = %ucs2('I love my dog spot'); output2 = %char(input2); *inlr = *on; /end-freeChange it to CCSID(1200) if you want UTF-16 (which is a superset of 13488, I think.)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.