januslo / react-native-bluetooth-escpos-printer

React-Native plugin for the bluetooth ESC/POS & TSC printers.
MIT License
359 stars 416 forks source link

Print euro sign on Android #122

Open christianrank opened 4 years ago

christianrank commented 4 years ago

On iOS, I can print the euro sign without any problems.

On Android, it prints Ç instead of €.

How to fix this?

LightningNemesis commented 3 years ago

I'm unable to print € symbol on android, instead it prints a chinese text. I'm using the BluetoothEscposPrinter.printText('€') function and using encoding as UTF-8 and codepage of 0. Any suggestions on what I am doing wrong or can do to rectify the issue?

LightningNemesis commented 3 years ago

@christianrank I got it to work. I was using the UTF-8 encoding with codepage 0 and the (english) text was coming out fine, save for symbols like • and €. All that you need to do is change encoding to Cp1252 and code page to 32. Cheers! ;-)

check the pic to get a clearer idea:

Screenshot 2020-09-09 at 5 34 12 PM
aroumane commented 3 years ago

Hello, For the euro sign the configuration is this:

{
encoding:' Cp858',
codepage: 13
}

for the French language

Oshannk commented 1 year ago

@christianrank I got it to work. I was using the UTF-8 encoding with codepage 0 and the (english) text was coming out fine, save for symbols like • and €. All that you need to do is change encoding to Cp1252 and code page to 32. Cheers! ;-)

check the pic to get a clearer idea: Screenshot 2020-09-09 at 5 34 12 PM

How to find those specific codepage numbers? I am trying to use UTF-8 but it gives me some Chinese characters. I need to know what is the codepage for the UTF-8 encoding.