CODE_PAGE_858_EURO
is okay for Spanish characters, but not for Eastern European ČŠŽĐ
.
The proposed solution is not working for me properly. After a lot of searching, I have come up with a solution.
Set code page that suport Slavic characters:
xx.mBixolonPrinter.setSingleByteFont(BixolonPrinter.CODE_PAGE_852_LATIN2);
Use a function to covert Slavic characters to something bixolon spp r400
will understand understand:
xx.mBixolonPrinter.printDotMatrixText(SloConvText, alignment, attribute, size, false);
where SloConvText
is:
SloConvText = ReplaceSloChar(s_textLine,ConvString);
And the key solution, ReplaceSloChar
(without \u0003
is not okay, uses two bytes instead, both Korean signs)
public static String ReplaceSloChar(String inString, String ConvString) {
String S1 = inString.replaceAll("Č","\u010C\u0003");
String S2 = S1.replaceAll("Š","\u0160\u0003");
String S3 = S2.replaceAll("Ž","\u017D\u0003");
String S4 = S3.replaceAll("č","\u010D\u0003");
String S5 = S4.replaceAll("š","\u0161\u0003");
ConvString = S5.replaceAll("ž","\u017E\u0003");
return ConvString;
}
It is overhead, but sending čšž
in any form to bixolon spp r400
is not working at all.