Btxml cannot correctly print out Chinese string through Commander
I use php to generate btxml format file and trigger by Commander to print out label.
The file can successfully trigger label printing through Commander but the content is not correct.
I have test the same file by using bartender to execute btxml file directly, it seems the content is correct.
Is there any extra setting required for btxml file to print correct content?
Here is the btxml file content
<?xml version="1.0" encoding="utf-8"?>
<XMLScript Version="2.0">
<Command Name="DataInsert">
<FormatSetup>
<Format SaveAtEndOfJob="true" CloseAtEndOfJob="false">C:\Commander\P1\Label\UWIZ_Semi.btw</Format>
...
<NamedSubString Name="LabelName">
<Value>大和 BTA</Value>
</NamedSubString>
...
</FormatSetup>
</Command>
</XMLScript>
The output becomes: 憭批? BTA
btxml file content is 大和 BTA even when the setting is SaveAtEndOfJob="true" but the label content is incorrect.
-
Joseph Tung
★ BarTender Hero ★
Hope it's not too strange that I can now post a solution for my own question.
Since the bartender can execute the same btxml file correctly while Commander cannot, I turn to check the commander setting to get some ideas about this issue. There is a "file coding" in task properties (since my interface is Chinese, I am not sure what is the wording of this option, but there is and underline "O" for this item and it's at the bottom of task properties setting menu), the setting when problem happens is use "system default", after I change it to "utf-8", the problem is gone.
It seems the problem is when I generate btxml file is using utf-8, but the system default is not utf-8 (I guess it's BIG5 or GB something). When Commander receives the btxml, it uses the wrong coding and send the false information to Bartender. Hope my experience can help others to solve the problem more quickly.
Thanks!!
0 -
Niu Na
★ BarTender Hero ★
Hi @Joseph Tung, could you please show more details about your solution? I've got similar Chinese Fonts issue when using BTXML. Thanks a lot!
0
Please sign in to leave a comment.
Comments
2 comments