打印泰语 [英] Print Thai language

查看:262
本文介绍了打印泰语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用ESC/POS将收据打印到收据打印机的应用程序.它需要支持泰语.

I have an application which print the receipt to receipt printer using ESC/POS. It needs to support Thai language.

当我尝试打印泰语时,某些字符正像这张照片一样被分开:

When I tried to print Thai language, some of the characters are being separated like this photo:

这是我的代码:

printMSG = Command.ESC + "t" + Command.DecimalToCharString(27);
port.Write(printMSG);
var enc = Encoding.GetEncoding("windows-874");
string content = "ข้าวผัดอินโดนีเซียกับเครื่องเทศแบบดั้ง";
byte[] bytes = enc.GetBytes(content);
port.Write(bytes, 0, bytes.Length); 

我不知道.请帮我.会成为救生员.

I don't have any idea. Please help me. Would be a life savior.

推荐答案

这是我上面评论中所描述的图片. 我编写了一个简单的For..Next循环,以打印出泰语代码页中的字符. 从我的图片中,我突出显示了代码页中的双字符和泰式字符的字符号.

Here is the picture as I have described above in my comments. I have written a simple For..Next loop to print out the characters in the Thai codepage. From my picture I have highlighted the double char in the codepage and the char number of the Thai char.

此外,第三个打印输出显示了我的代码,打印出泰文句子,每个泰文句子三行.第一句和第三句有三行.

Also, the third the printout shows the my code printing out Thai sentences with three lines for each Thai sentence. The first and third sentence has three lines.

这篇关于打印泰语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆