davidb16
Member
Need to get Japanese characters that are stored in JDE 7.3, on a AS/400 V5.2, converted to Unicode.
Have created RPG functions for this. Works if I have the correct UCS2 hex value
Using %UCS2 RPG function to get starting point from DBCS give wrong value...most of the time.
but sometimes it works.
Fails example:
端
DBCS in DRDL01 stored with shift out/in
select hex(drdl01) from F0005
x'0e48ef0f'
Defined RPG
H ccsid (*ucs2:13488)
H* ccsid (*ucs2:1200)
D myUCS2 10C
myUcs2 = %ucs2(drdl01)
DEBUG: eval myUcs2:x = x'975E' should be x'7AEF'
kanji begin and end parenthesis do work .
( and )
Debug: eval myUCS2: x'ff08' and x'ff09'
Using the other functions I created I get Unicode correctly for these.
Changing JOB CCSID makes no difference.
Changing H spec ccsid no diff 13488 and 1200
I'm out of ideas.
Have created RPG functions for this. Works if I have the correct UCS2 hex value
Using %UCS2 RPG function to get starting point from DBCS give wrong value...most of the time.
but sometimes it works.
Fails example:
端
DBCS in DRDL01 stored with shift out/in
select hex(drdl01) from F0005
x'0e48ef0f'
Defined RPG
H ccsid (*ucs2:13488)
H* ccsid (*ucs2:1200)
D myUCS2 10C
myUcs2 = %ucs2(drdl01)
DEBUG: eval myUcs2:x = x'975E' should be x'7AEF'
kanji begin and end parenthesis do work .
( and )
Debug: eval myUCS2: x'ff08' and x'ff09'
Using the other functions I created I get Unicode correctly for these.
Changing JOB CCSID makes no difference.
Changing H spec ccsid no diff 13488 and 1200
I'm out of ideas.