Open vasilevzhivko opened 3 years ago
Take a look at the official Star documentation to see if you can find the correct encoding
Take a look at the official Star documentation to see if you can find the correct encoding
Found the solution, if you want I can create a pull request. Its quite simple actually for some printers (for example mine: SM-S230I) the encoding is really specific in my case for Bulgarian language is CP855 and for Russian is CP866. So what is needed is to add the encodings in types\index.d.ts like so:
static Encoding: {
USASCII: string,
Windows1252: string,
ShiftJIS: string,
Windows1251: string,
GB2312: string,
Big5: string,
UTF8: string,
CP855: string
};
and also in RNStarPrntModule.java a little modification to the getEncoding function like so:
else if (encoding.equals("CP855")) {
try {
return Charset.forName("CP855"); // Bulgarian
}
catch (UnsupportedCharsetException e) { //not supported using UTF-8 Instead
return Charset.forName("UTF-8");
}
}
p.s. I found the encodings here: Encodings for Java
Hello, I am trying to print in Bulgarian language, but the encoding seems not to work. Here is my code:
when I print I only get some strange symbols. Anyone else tried to print in Bulgarian/Russian?