Thermalink

ESC/POS command reference › ESC t

ESC t (1B 74): select the code page for accents and the euro sign

Receipt printers do not understand UTF-8. They print one byte per character from a code page, and 1B 74 n picks which one.

ASCIIESC t n
Hex1B 74 n
Decimal27 116 n

Parameters

ncode page number. In Epson numbering: 0 = CP437, 2 = CP850, 16 = Windows-1252, 17 = CP866, 19 = CP858 (CP850 with the euro sign). Numbers differ between brands; the self-test page usually lists them.

What it does

Bytes 0x00 to 0x7F are plain ASCII on every page. Bytes 0x80 to 0xFF depend on n: the same byte can be "é" on one page and a box-drawing line on another. Encode your text with the matching code page before sending it.

UTF-8 uses two or three bytes for each accented letter, so "Café" sent as UTF-8 prints as "Caf├⌐" on CP437. The viewer flags UTF-8 sequences for this reason.

escpos-php's selectCharacterTable() writes ESC t n, except on Star printers, where it writes ESC GS t n instead, so the same number does not work across brands.

A printer in double-byte (Kanji / Chinese) mode ignores this for bytes above 0x80. That happened on my BIXOLON: every probe line printed Chinese characters whatever n was, and the cause was a memory switch. I wrote it up on dev.to.

Example

The euro sign is byte D5 in CP858 (n = 19) but byte 80 in Windows-1252 (n = 16).

1B 74 13 43 50 38 35 38 20 65 75 72 6F 3A 20 D5 20 63 61 66 65 3A 20 63 61 66 82 0A 1B 74 10 57 69 6E 2D 31 32 35 32 20 65 75 72 6F 3A 20 80 0A 1B 74 00

Preview drawn in your browser by the ESC/POS viewer's engine on 80 mm paper. Letters use a similar monospace font, not the printer's own. Open this example in the viewer to edit the bytes.

How the viewer decodes these bytes
CommandWhat it doesBytes
ESC tCode page 19: PC858 (Euro) (Epson numbering)1B 74 13
Text"CP858 euro: € cafe: café"43 50 38 35 38 20 65 75 72 6F 3A 20 D5 20 63 61 66 65 3A 20 63 61 66 82
ESC tCode page 16: WPC1252 (Western) (Epson numbering)1B 74 10
Text"Win-1252 euro: €"57 69 6E 2D 31 32 35 32 20 65 75 72 6F 3A 20 80
ESC tCode page 0: PC437 (USA, Standard Europe) (Epson numbering)1B 74 00

Sending it from code

JavaScript (bytes)

// Encode yourself; TextEncoder only does UTF-8.
const cp858 = { "€": 0xd5, "é": 0x82 };
const bytes = [0x1b, 0x74, 19, ...[..."5 €"].map(c => cp858[c] ?? c.charCodeAt(0))];

PHP with escpos-php

$printer->selectCharacterTable(19); // 1B 74 13 on Epson-style printers

Python (raw bytes)

data = b"\x1b\x74\x13" + "Café 5 €\n".encode("cp858")

Common mistakes

Related commands

Sources

I wrote this page from the open-source libraries above, Thermalink's own output and tests on my BIXOLON printer. It is not copied from Epson's manual. For model-specific details see Epson's official ESC/POS reference or your printer maker's manual. Last checked 22 November 2026.

Building receipts byte by byte? Thermalink lets a web app send the receipt as JSON and prints it silently, with QR codes, logos, cut and cash drawer ($49 one-time).