ESC-POS-.NET icon indicating copy to clipboard operation
ESC-POS-.NET copied to clipboard

Print for Traditional Chinese

Open linycyc opened this issue 3 years ago • 3 comments

How to print the traditional chinese word from PrintLine function ? I try to encode utf-8 and big5, but not working, and i use the virtual printer from RawBT android app to test

linycyc avatar Jun 14 '21 17:06 linycyc

You can only print simplified Asian alphabets (for example, in Japanese, you can only print katakana and hiragana and the kanji support is limited, although there are code pages for it). The cause of the limitation is that it must have character pages available in your printer that you can switch to that represent each character (it doesn't support unicode strings directly).

Now, if you live in China you will probably have a different set of code pages than what the US market has. Do you have a manual for the specific printer you have? That would be one possibility for printing your unicode strings. If you want to print traditional Chinese characters in a way that works across all printer models, the way to solve that would be to either

  1. Create a dynamic character map in memory on the printer and stream each character into the character map as you print, or
  2. Rasterize the unicode text and print it to the printer as an image.

This is something that would be super cool to support, so if you're interested to deep dive into either, please let me know and I will be happy to guide you on implementing this - although I will not be able to implement this myself.

lukevp avatar Sep 05 '21 22:09 lukevp

Hi Luke, I’m super interested to help implement the rasterisation method. Did you ever get very far with looking into it?

dredgy avatar Jan 07 '22 13:01 dredgy

Related to Original Question: https://github.com/lukevp/ESC-POS-.NET/issues/88#issuecomment-744974099

igorocampos avatar Jan 23 '24 03:01 igorocampos