Unicode text in an embed

Checked on build 14407, 10-05-2026. “Type it” needs build 14397 or later; the two alternatives work on every build.

Question. How do I put Greek, Russian, Chinese or other Unicode text into an embed? The .app stores embed text in the Windows ANSI code page.

Answer: type it. Inside a '...' literal in any embed (Embed Editor or Embeditor), type the text and save. The literal is stored in the .app as its portable U'...' form, the same thing the Window and Report Designers do for a caption, and when you open the embed again the editor shows your letters: U'Привет'. Literals the code page can hold are saved byte-identical, so existing embeds do not change; only string literals are converted, a comment goes through the code page as before. The variable receiving it is a USTRING, declared in a data embed.

Two alternatives when you want the text visible in source control as plain ASCII:

  • Spell the code points: U'<1055,1088,1080,1074,1077,1090>' (decimal) or U'<3A9h>' (hex, trailing h), same result.
  • Put the statements in an include file saved as UTF-8 with a BOM and INCLUDE('MyText.inc') it from a CODE embed. Two rules: the include’s statements are INDENTED (column 1 is the label column; unindented = “Expected: ” at the include line), and the INCLUDE sits in a code embed, never a data embed (there the assignment parses as a declaration: “Illegal data type” + “Expected: ” at the literal).

Help (the topic titles and index words that find it in the Help file): How do I put Greek, Russian, Chinese or other Unicode text into an embed? Index: one phrase per script (“Greek text in an embed”, “Japanese text in an embed”, …).

Yes, the Embed editor does save U literals now in 14407, but there’s a small glitch. Not in comments.
MESSAGE('Glo:Greek = ’ & Glo:Greek & |
‘|Length = ’ & LEN(Glo:Greek) & |
‘|Size = ’ & SIZE(Glo:Greek), U’Κλόουζ’ & ’ button’, ICON:Asterisk)

! ‘|Size = ’ & SIZE(Glo:Greek), U’???’ & ’ button’, ICON:Asterisk)

Hi Bob - that is the rule working as documented rather than a glitch, though I see why it looks like one.

The Embed Editor converts string literals to the portable U’’ form when it saves. The line you commented out with the exclamation mark is a comment from end to end, so there is no literal on it any more. The whole line goes through the Windows code page the way comments always have, and Greek has no place in that code page. The live MESSAGE line above it keeps its U’Κλόουζ’ because there the text is a literal.

If you want a parked statement to keep its text, two ways:

  1. Park it as code instead of a comment. The literal stays a literal and is saved as U’':
  OMIT('**parked**')
  MESSAGE('|Size = ' & SIZE(Glo:Greek), U'Κλόουζ' & ' button', ICON:Asterisk)
  **parked**

  1. Spell the text as code points in the comment. That is plain ASCII and survives anywhere, comments included:

! '|Size = ' & SIZE(Glo:Greek), U'<39Ah,3BBh,3CCh,3BFh,3C5h,3B6h>' & ' button', ICON:Asterisk)

Comments stay in the code page on purpose: converting every non-ASCII run would retype literals that work today.

We ran your exact three-line MESSAGE through the editor’s save and reload here and the U’Κλόουζ’ on the last line comes back intact. If the live line itself turns into ??? on your side, send the embed as a TXA and we will look.

One request for next time: put code inside a clarion code fence in your post. The forum turned the apostrophes in your lines into typographic quotes, and a copy of them from the page neither compiles nor keeps its Greek on save, because to the editor a literal opens only at a straight apostrophe. We pasted your three lines from the page into an embed as they are and the last line came back as U’???’ on save; with the quotes retyped straight and saved again the Greek is there.


! processed code

    MESSAGE('Glo:Greek = ' & Glo:Greek & |

    '|Length = ' & LEN(Glo:Greek) & '|Size = ' & SIZE(Glo:Greek), U'Κλόουζ' & ' button', ICON:Asterisk)