delphi - Printout special symbols on thermal printer -


i have trouble printing special symbols(€, £, ¥, ý) on epson tm-t88v thermal printer on esc/pos commands. here part of code:

fprintoutlines := tstringlist.create; try   fprintoutlines.add(#$1b'@');   fprintoutlines.add(#$1b't'#16);   fprintoutlines.add('€, £, ¥, ý'+#$a);   print   fprintoutlines.free;   end; 

on windows xp have correct printout symbols, problem windows 7 , 8.

i build stringlist commands, send line line printer. works other symbols , images not special symbols.

can me, how can print symbols windows?

here code prints lines:

var   vcurrentline : ansistring; begin ... := 0 fprintoutlines.count - 1 begin   vcurrentline := ansistring(fprintoutlines[i]);    if (printrawdata(hprn, pansichar(vcurrentline), length(vcurrentline)) < 0) begin     log('printrawdata error', 'nativeprint');     endrawprintpage(hprn);     endrawprintjob(hprn);     exit;   end; 

end;

i have found way. here function convert string before send printer. works correctly on windows

function tnativeprint.widestringtostring(const astr : unicodestring; vcodepage : word) : ansistring; var   vlen: integer; begin   vlen := length(astr);    if (vlen = 0) begin     result := '';     exit;   end;    setansistring(@result, @astr[1], vlen, vcodepage); end; 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -