EGL Development User Group

EGL Development User Group

EGL Development User Group

The EGL Development User Group is dedicated to sharing news, knowledge, and insights regarding the EGL language and Business Developer product. Consisting of IBMers, HCL, and users, this community collaborates to advance the EGL ecosystem.

 View Only
Expand all | Collapse all

Unicode string, normalization forms - EGL

  • 1.  Unicode string, normalization forms - EGL

    Posted Mon March 23, 2015 09:30 AM

    Hello EGL users!

    We have a little issues here in our company. Our databases went up on unicode and a lot of work is still on CICS and Virtel screens (ex PCOM).

    CICS is working only with 255 signs , code page 870.

    Because of that  our developers made converter that converts UNICODE characters from database to EBCDIC characters that CICS can put on green screen as we made a deal with our customers ( what UNICODE goes in what EBCDIC).

    Everything was going great until we came up with signs that need normalization form.  If you do not know what Im talking about, this is that: 

    http://unicode.org/reports/tr15/

    Java has a class that makes that : http://developer.android.com/reference/java/text/Normalizer.html

    Is there any function for string normalization ? I know that Unicode in development tools does not exist so long, but this is some basic stuff.

    How can we work with unicode database if we can not put normal string on screen?

    I am geting question mark after every character that needs normalization.

    Thank you for all your help :)

    Augustina


  • 2.  Re: Unicode string, normalization forms - EGL

    Posted Wed March 25, 2015 02:05 PM

    I am not sure what you are asking for, as an answer. I can say this however: if this is EGL cobolGen, and you have program unicode variables (from the database) and char variables (ebcdic for the screens), when you move the unicode to char, the cobol source that gets generated will invoke the cobol built-in intrinsic function (either implicitly or explicitly) called display-of, which will call the cobol runtime to convert the unicode characters to ebcdic ones. It does this by using the code page that was defined for the cobol compile. When the reverse is done, the ebcdic is converted to unicode by the cobol function national-of.

    The generated EGL code, if cobolGen was used, would have used these cobol functions to convert the values for you. I am not sure why your developers wrote their own converter.

    Maybe I am not understanding what is trying to be said here. Perhaps you could elaborate a bit for me, so I can help a bit more.

    Jeff.Douglas