Hi Guys,
I am new to Unicode processing in COBOL.
Need help on COBOL coding
Background:
1. I need to fetch (name field) set of records from the table which is UTF8 format to a COBOL program.
2. Read a record and identify specific special/DBCS and replace with one or byte char defined for each special/DBCS char.
3. convert to UTF8 and write it to a file.
E.g.
Special/DBCS - Replace Char (1/2 Bytes)
Æ - AE
Ð - D
É - E
ij - IJ
Ŋ - NJ
ñ - n
ƕ - hv
DŽ - DZ
ȸ (U+0238) - AB
For example
1. Name: Nuño Iñaki Iñigo BeDŽat
Identify above special/DBCS in the string 'Nuño Iñaki Iñigo BeDŽat' and replace with respective characters.
expected Output is 'Nuno Inaki Inigo BeDZat'
Questions:
1. How can Identify a DBCS (UTF8) character in a string (UTF8 format) in COBOL
2. How can I replace two/three bytes UTF8 character with EBCDIC 1 byte character (Here the length of the string might change)
Please advice.
Thanks,
Kumar