On Tue, 5 Sep 2017 22:30:59 +0800, Timothy Sipples wrote: > >FYI, if DB2 for z/OS is in the loop then DB2 will convert UTF-8 to UTF-16 >for your PL/I application(s). Just store the UTF-8 data in DB2, use the >WIDECHAR datatype, and it all happens automagically, effortlessly, with no >UTF-8 to UTF-16 programming required. See here for more information: > >https://www.ibm.com/support/knowledgecenter/en/SSEPEK_12.0.0/char/src/tpc/db2z_processunidatapli.html > What language(s) cleanly handle vertical alignment of formatted text output when the text contains UTF-16 supplemental/surrogate (not in the BMP) characters? Here's an example of /bin/printf's failure for similar input with UTF-8 on MacOS:
The script: printf "%-22s+++\n" "Hello World." printf "%-22s+++\n" "Привет мир." printf "%-22s+++\n" "Bonjour le monde." writes: Hello World. +++ Привет мир. +++ Bonjour le monde. +++ I wish the "+++" would line up (at least in a monospaced font). What sort of PICTURE would work for such, not restricting to BMP? >If for some odd reason you absolutely insist on an EBCDIC-ish approach then >you can do what the Japanese have done for decades: Shift Out (SO), Shift >In (SI). Refer to CCSID 930 and CCSID 1390 for inspiration. You'd probably >use one of the EBCDIC Latin 1+euro codepages as a starting point, such as >1140, then SO/SI from there to pick up the exceptional characters. > The worst of both worlds. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
