Page 1 of 1

Graphicvar UTF8 (1208) or UCS2 (13488)

Posted: Fri Jan 08, 2016 6:01 am
by lsmichel
Hi , i want to create a table , with UTF8 (1208) or UCS2 (13488) columns.
I want to display data from the table with ProfoundUI.
So i have created a rich display file and stated all the fields referring to the table.
In my rpgle program i have stated a data structure like the screen format.
I use Eval-corr when a retrieve data from the table. But i get an error.
How to display unicode field with ProfoundUI ?
Thank to help me.

Re: Graphicvar UTF8 (1208) or UCS2 (13488)

Posted: Fri Jan 08, 2016 12:31 pm
by Scott Klement
Instead of 13488, I would use 1200. CCSID(1200) is UTF-16 which is a superset of 13488 (UCS-2)

This is done in the binding dialog when binding a variable to a property. Under "Data Type" choose "graphic". Then click the "keywords" button at the bottom of the dialog
uni1.png
uni1.png (30.65 KiB) Viewed 657 times
In the keywords dialog, type CCSID(1200) and click "Add" followed by "Ok"
uni2.png
uni2.png (17.39 KiB) Viewed 657 times
This has now been defined as a Unicode (UTF-16) field. It will appear in your RPG program as data type C (UCS-2).

I would also consider adding a CTL-OPT or H-Spec to tell RPG to use CCSID 1200 for Unicode fields:

Code: Select all

H CCSID(*UCS2: 1200)