Can't Print Chinese Character or Unicode Char.
Opened this issue · 1 comments
jink2005 commented
Print Chinese Character will get following error:
Error: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
Maybe need encodeURIComponent and decodeURIComponent.
jink2005 commented
I use Base64 lib from third party replace the btoa to solve this problem.
this.printRaw = function (data, printer) {
// var request = {a: "printraw", printer: printer, data: btoa(data)};
var request = {a: "printraw", printer: printer, data: BASE64.encode(data)};
sendAppletRequest(request);
};