I am working on a new project which will have users across the globe. So user may interact with any language.
I need to create the database which can store the all languages text. I have tried with Graphic type with CCSID 1200 but in RPGLE I am not able to do string operations and any other temp fields I create with same type the compilation issue is coming up. Then I have tried with CCSID 1208 with Char type field. This is working but for any quiry data is coming as junk. Please let me know if you are aware of multi-lingual application support.
Thanks and Regards,
Pinned topic How to create a PF which can store text from English,Arabic,Polish, Chinies
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-10-19T12:12:47Z at 2011-10-19T12:12:47Z by barbara_morris
barbara_morris 120000DX5W406 Posts
Re: How to create a PF which can store text from English,Arabic,Polish, Chinies2011-10-19T12:12:47ZThis is the accepted answer. This is the accepted answer.Your G field with CCSID 1200 is a "UTF-16" field. In RPG, you define a UTF-16 field with type C, not type G. (RPG uses the name "UCS-2" for this type.)
Add this keyword to your H spec to set the default CCSID for UCS-2 definitions:
H CCSID(*UCS2 : 1200)
Then define your temp UCS2 fields like this:
D tempname s 25c varying
Using type A with CCSID 1208 will not work the way you want. The A fields are converted to/from the job CCSID when you read/write a record, so you are limited to the 256 characters in the job CCSID, rather than the full character set of UTF-8 (CCSID 1208).