Plain English

Selects the character encoding for TEXT data (TSPL2 PG §CODEPAGE p18–19). Different code pages support different glyph sets — critical for international characters. Default at power-on is `437` (US OEM). The PG enumerates four families: 7-bit national variants (USA / BRI / GER / FRE / DAN / ITA / SPA / SWE / SWI), 8-bit DOS codepages (437 / 850 / 852 / 860 / 863 / 865 / 857), Windows codepages (1250 / 1252 / 1253 / 1254 / WPC1251 / WPC1255 / WPC1257 / 866), plus per-model UTF-8 / CJK additions in the model-specific appendix. Engine-recognised but doesn't currently apply byte→glyph mapping in TEXT (always passes through UTF-8/ASCII). Follow-up tracked for the mapping work.

When to use

Once per label-script when printing non-ASCII characters whose mapping depends on encoding (e.g. accented Latin, Cyrillic, Greek, Turkish). Pair with COUNTRY for region-appropriate date/keyboard handling.

Syntax

CODEPAGE n

Parameters

ParameterDescription
n
Code page identifier (case-insensitive).
  • USA - 7-bit USA
  • BRI - 7-bit British
  • GER - 7-bit German
  • FRE - 7-bit French
  • DAN - 7-bit Danish
  • ITA - 7-bit Italian
  • SPA - 7-bit Spanish
  • SWE - 7-bit Swedish
  • SWI - 7-bit Swiss
  • 437 - 8-bit USA OEM (default at power-on)
  • 850 - 8-bit Multilingual Latin-1
  • 852 - 8-bit Slavic / Latin-2
  • 857 - 8-bit Turkish
  • 860 - 8-bit Portuguese
  • 863 - 8-bit Canadian-French
  • 865 - 8-bit Nordic
  • 866 - 8-bit Cyrillic II
  • 1250 - Windows Central Europe
  • 1252 - Windows Latin I (Western Europe)
  • 1253 - Windows Greek
  • 1254 - Windows Turkish
  • WPC1251 - Windows Cyrillic
  • WPC1255 - Windows Hebrew
  • WPC1257 - Windows Baltic

Example

CODEPAGE 1252
SIZE 100 mm, 50 mm
CLS
TEXT 50,30,"3",0,1,1,"Café Müller"
PRINT 1

Use Windows-1252 for Western-European characters

Try it in the playground View all TSPL commands