Datamax DPL Chinese characters printing - printing

I'm trying to print this text "简体字" on an example label using bartender and sending DPL code generated printing to file.
The output i got of the text field is
1911UC001310051P010P010¼òÌå×Ö
In the documentation i found the example
1911UC002650150P012P012<BD><D0>A1><A1><A1><A1><BD><D1><A1><A1><A1><A1><BD><D2><A1><A1>
<A1><A1><BD><D3><00><00><CR>
the < XX > fields are hex.
I used a native GB chinese font, that's enabled on the printer and set on the DPL by the command yUGB.
What am i doing wrong?

Related

Zebra printer ZT610 doesn't print polish signs while ZTC 110 does

I am trying to print polish signs with font Verdana ( contains polish signs). The problem is that on the printer ZTC 110 code :
^XA
^FS
^CWZ,E:VERDANAB.FNT^FS
^FT100,100^FH^FD żółć
^XZ
works perfectly fine and polish signs are printed , while on the new printer ZT610 polish letters are missing (font was downloaded properly with .TTF format). All I can see in a place of sign is a blank space. When I m using zebra designer 2 polish letters are printed, they also are printed when I add command ^CI28 to the code ( used ^FH^FD here and special utf 8 code for polish signs),
^XA
^CI28
^FS
^CWZ,E:VERDANAB.TTF^FS
^FT100,100^FH^FD _C5_BC_C3_B3_C5_82_C4_87_C5_B9 ( żółć // here is the blank space )
^XZ
but it worked on previous printer without doing those things. Drivers were installed properly, fonts were installed properly, any ideas why is it happening?

need to print greek characters from zpl ii commands using a zebra printer

i have problem printing greek characters to a Zebra GC420 desktop printer. My code is:
$printarr[] = '^XA^CWZ,E:TT0003M_.FNT^FS^XZ^XA^FWN^FO70,50^A0,30,25^FH^FD'.labels_utf8_parse($name).'^FS^FO70,90^BY2^B3,,100^FD' . $node->field_o['und'][0]['value'] . '^FS^XZ';
What am i doing wrong? Instead of greek letters i get crosses. The strange part is that in another area of the code,the below code prints correctly greek characters:
$toprint = '^XA^CWZ,E:TT0003M_.FNT^FS^XZ^XA^FWR';
What should i do, how should i proceed to see what is the problem and how could i solve it?
You need to set the character encoding to UTF-8 using ^CI28. Put it near the top of the format, for example, after the ^XA^FWN.

How to determine if characters within a file have been corrupted or are just being viewed with incorrect encoding

The file I'm dealing with contains text where some characters aren't showing correctly upon opening.
I've been told the file has UTF-8 encoding but when I open in sublime text 3 (I even used the re-open in UTF-8 option) there are a number of characters that show as ? -
For example Jiří is incorrectly being shown as Ji?í - so the ř isn't shown correctly but the long i í is. There are other characters for example č ň ř that are also not showing correctly.
After some investigation it looks like the file is in ASCII encoding (a subset of UTF-8).
file ~/my_location/my_file.txt
~/my_location/my_file.txt: ASCII text, with very long lines, with CRLF line terminators
I've checked the character set for ASCII and for example ř is present, so I'm wondering if the issue is that these characters are already corrupted or the above file encoding check that I used isn't showing the correct file encoding.
I've tried a few conversions to utf8 but none of them fix the characters.
iconv -f ISO-8859-1 -t UTF-8 ~/my_location/my_file.txt > ~/my_location/my_file_f_ISO-8859-1.txt
iconv -f CP1252 -t UTF-8 ~/my_location/my_file.txt > ~/my_location/my_file_f_CP1252.txt
iconv -f Windows-1252 -t UTF-8 ~/my_location/my_file.txt > ~/my_location/my_file_f_Windows-1252.txt
Would appreciate if anyone has any thoughts on how I can proceed in the investigation...

printfn not producing expected results for international (non-latin) characters

I have the following program:
let txt = "إتصالات"
printfn "Text is: %s" txt
0 // return an integer exit code
The value of txt is being set to some Arabic characters. When I run the program what is being displayed on the console is a bunch of question marks rather than the characters. In the Visual Studio 2012 debugger the correct characters are being displayed for the txt variable.
What am I doing wrong and how does one properly display international characters?
According to How to write unicode chars to console? you need to set the OutputEncoding property on the console, like this:
System.Console.OutputEncoding <- System.Text.Encoding.Unicode
let txt = "إتصالات"
printfn "Text is: %s" txt
0 // return an integer exit code
The answer for that question is worth reading though, because it also describes why you need to change your console font to really make this work, and also how to do it.
Here are some additional links with more information:
Necessary criteria for fonts to be available in a command window (this is for Windows 2000 and may not entirely apply to Windows 8, but it should give you a good idea of what to look for in a font).
Windows Console and TrueType Fonts shows how to add new fonts to the console.
Anyone who says the console can't do Unicode isn't as smart as they think they are has some background information about writing Unicode text to the console.
Update: Since the Arabic text in the example renders just fine here on StackOverflow, I peeked at the CSS to see which fonts they're using to render preformatted text. Using that list and the Windows Character Map tool (Start -> All Programs -> Accessories -> System Tools -> Character Map), I've found the Courier New font (which ships with Windows) supports Arabic characters. If you use the registry hack in the "Windows Console and TrueType Fonts" link (above), you should be able to add Courier New as a font you can use in the console.

How to print Java code on A3 page avoiding line-wrapping

I have to print Java code that some times reaches 300 columns (characters per line) in A3 paper and whatever editor I use (e.g. textmate) wraps the lines in order to fit in A4 paper.
Any suggestions?
cheers,
Asterios
Your editor undoubtably has either a Page Setup dialog or a Preferences dialogue as part of the Print Dialogue which will allow you to set the Paper Size to use for printing.
Even Notepad supports this
I finally made it to print using enscript. Here is the command I used to print Java code into PDF (and the used the pdf to print).
enscript -r -Ejava -M A3 -C -f "Courier8" input.java -o - | ps2pdf - output.pdf
where:
-r prints in landscape mode
-C prints the line numbers
-f changes the font and size
-M sets the output media to A3 (default is A4)
-Ejava adds syntax highlighting (you can also use --color if you need
colors in syntax highlighting but
they are not nicely printed in
greyscale)
It seems unlikely that every editor tries to format for A4. Which other editors have you tried? Does textmate not have a page size option? (Hmm... seems not)
Try a different editor that does let you set page size. Word, even.

Resources