MOVE U'Latin, русский, español, français, Ελληνικά, עִברִית. '
TO UtF-8-STRING
Where UtF-8-STRING is defined with PIC U(length).
UTF-8 literals in IBM COBOL are U’utf-chars-or-\Unnnn-escapes’.
I agree, the less said about UTF-EBCDIC the better.
Peter
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Paul Gilmartin
Sent: Friday, January 2, 2026 8:52 PM
To: [email protected]
Subject: Re: Please vote for COBOL "idea" for reverse character translation
On Fri, 2 Jan 2026 18:09:28 -0500, Phil Smith III wrote:
>Showing my ignorance of COBOL: Does a MOVE from EBCDIC->UTF-8 mean "Here's a
>variable defined as n EBCDIC characters, please move it to this other variable
>defined as (at least) n UTF-8 characters"?
>
>If so, as Gil intimated, I wouldn't say there "is no technical reason". I can
>think of at least one problem: A UTF-8 string that contains characters from
>multiple UTF-8 blocks. For example, x'52' in EBCDIC 410 (Cyrillic) is a њ; in
>420 (Arabic) it's ؤ. There's no reason a UTF-8 variable cannot contain њؤ but
>if it does, you can't convert back to EBCDIC.
> ...
How can a programmer code a (PIC U) constant or initial value?
I imagine something like:
MOVE 'Latin, русский, español, français, Ελληνικά, עִברִית. '
TO UtF-8-STRING;
Details? Would it be legible in compiler SYSPRINT?
The following works in Regina-Rexx, but hardly practical:
say ,
'4C6174696E2C20D180D183D181D181D0BAD0B8D0B92C2065737061C3B16F6C2C206672616EC3A76169732C20CE95CEBBCEBBCEB7CEBDCEB9CEBACEAC2C20D7A2D6B4D791D7A8D6B4D799D7AA2E20'x
Are there CCSID 1210-savvy terminals and or authoring tools??
Until there are, the less said about UTF-EBCDIC the better.
--
This message and any attachments are intended only for the use of the addressee
and may contain information that is privileged and confidential. If the reader
of the message is not the intended recipient or an authorized representative of
the intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication
in error, please notify us immediately by e-mail and delete the message and any
attachments from your system.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN