[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Converting from UTF16LE to Ascii
   Hi Magne
   Scott Klement wrote a little conversion-program for this.
   You can find it here:
   [1]http://forums.systeminetwork.com/isnetforums/showthread.php?t=14557
   1
   Best regards
   Jan
   Am 14.10.2011 19:06, schrieb Scott Klement:
Hi Magne,
The file you have is UTF-16LE, but CCSID 1200 is UTF-16.  The "LE"
stands for "little endian", whereas CCSID 1200 is "big endian."
IBM does not officially support UTF-16LE (CCSID 1202) anywhere on the
system as far as I know -- the only IBM-approved way to deal with
UTF-16LE is by converting it from UTF-16LE to UTF-16 (CCSID 1200) with
the QlgTransformUCSData() API.
Once converted to UTF-16 (which is fully supported), you can mark it as
CCSID 1200 and deal with it normally.
On 10/14/2011 3:57 AM, Magne Kofoed wrote:
    Hi Scott,
    I got a file in Unicode (UTF16LE) and tries to import to a pf.
    I have read a couple of your articles about this and got a few leads
    on how to do this, but could not find how to get from Unicode to
    ascii.
    1.      I store the file in IFS, it gets CCSID = 1252.  I can view the
    file with wrklnk and option 5, but I guess it's still Unicode since
    I've just stored it.
    2.      I tried to use these commands with no success:
    CHGATR OB(`/magnek/mms1.txt') ATR(*CCSID) VALUE(1200)
    I can not see any characters with wrklnk and option 5. But wordpad
    shows the file ok.
    CHGATR OB(`/magnek/mms1.txt') ATR(*CCSID) VALUE(819)
    Same result as in nbr 1.
    3.      I tried to use CPY fromccsid(1200) toccsid(819). Same result
    as in nbr 1.
    4.      I tried to use CPYFRMSTMF and CPYFRMIMPF with no success.
    How can I get this UTF16LE file from the IFS to a PF?
    Best regards,
    Magne
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
[2]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
References
   1. http://forums.systeminetwork.com/isnetforums/showthread.php?t=145571
   2. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------