Xamarin编码
我正在尝试调整我的代码中的口音,但是它不起作用,如下:
byte[] nBytes = Encoding.GetEncoding("ISO-8859-1").GetBytes(TagsConvert(texto));
socket.Send(nBytes);
结果在打印机中是这样的:tri?ngulo
,我需要结果为triângulo< /代码>。
我以前做过的另一次尝试是:
byte[] reset = Encoding.ASCII.GetBytes("\x0A");
byte[] nBytes = Encoding.ASCII.GetBytes(TagsConvert(texto));
socket.Send(nBytes);
socket.Send(reset);
我也没有成功。
I'm trying to adjust the accent in my code but it's not working, like below:
byte[] nBytes = Encoding.GetEncoding("ISO-8859-1").GetBytes(TagsConvert(texto));
socket.Send(nBytes);
The result is like this in the printer: tri?ngulo
, I need the result to be triângulo
.
Another previous attempt I made was:
byte[] reset = Encoding.ASCII.GetBytes("\x0A");
byte[] nBytes = Encoding.ASCII.GetBytes(TagsConvert(texto));
socket.Send(nBytes);
socket.Send(reset);
I wasn't successful either.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论