Quantcast
Channel: User vesperto - Stack Overflow
Viewing all articles
Browse latest Browse all 44

How to set character set using ESC/POS?

$
0
0

More specifically, what is the difference between ESC t and ESC R and when should i use them?

How does it tie with the character encoding of the byte arrays i may send to the printer?

Edit

As a follow-up,

  • the text to be printed is coming as ISO-8859-1 from the software and includes typical "Latin 1" Portuguese characters such as áéãç and
  • i'm setting ESC t to WPC1252 (0x10) and have also tried PC860 (0x03) to no avail
  • there is no ESC R that corresponds to Portuguese, so i tried
    • noy providing ESC R
    • using Spain I and II (0x07 and 0x0B respectively)

unsuccessfully.

I'm testing with multiple devices and the non-ASCII characters are always printed as "garbage".

A cheap Bluetooth printer prints Kanji characters, the test page shows "Codepage: GBK" but I can't find it in the reference; nor can i find "ANK" which is also referenced.

An Android device with built-in Bluetooth printer prints Greek characters and the test page says "Chinese mode: no" as well as
"Resident character:
Alphanumeric
GB1312<more kanji characters here>"

Edit

Ok, ANK is Alphabet Numeric Kana, so i assume Japanese.
GBK is Guojia Biaozhun and mostly Chinese.
Neither are relevant to me.


Viewing all articles
Browse latest Browse all 44

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>