如何在我的解码QR码应用程序中编码后者? [英] How to get I encoded japanese latter in my decoded QR code application?

查看:63
本文介绍了如何在我的解码QR码应用程序中编码后者?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编码了这个スキャン12,コード并得到这个????? 12,???;

我在unicode上使用多字节字符集。我需要多字节字符集的解决方案。



我尝试过:



i将此字符编码为UTF-8格式。在解码部分将读取字节解码格式的值。当我读取该解码字节段中的字符时,读取值显示为???这个。

I have encoded this "スキャン12、コード" and getting this "?????12,???";
i am using multibyte character set not on unicode. i need solution on multibyte character set.

What I have tried:

i have encode this character into UTF-8 format. in Decoding section will read the values on Byte Decoding format.when i read the character in that decode byte segment read values are show like ??? this.

推荐答案

我强烈建议您将应用程序更改为Unicode。如果不这样做,则必须选择正确的多字节字符集。这意味着输入必须只包含特定多字节代码页中的字符,并且您必须知道该代码页。如果输入包含该代码页未涵盖的Unicode字符,您仍然会有一些替换字符甚至是没有替换字符的问号。



当使用UTF-8时编码输入,使用 MultiByteToWideChar功能| Microsoft Docs [ ^ ]将Input转换为宽字符串。必须在任何情况下这样做;即使是多字节应用程序。



如果您真的希望您的应用程序是多字节的,那么您必须使用 WideCharToMultiByte函数| Microsoft Docs [ ^ ]将上述转换创建的宽字符串转换为所需的多字节代码页。
I highly recommend to change your application to Unicode. When not doing so, you have to select the correct multi byte character set. That means that the input must contain only characters from a specific multi byte code page and you have to know that code page. If the input contains Unicode characters not covered by that code page, you will still have some replacement characters or even question marks for characters without replacements.

When having UTF-8 encoded input, use the MultiByteToWideChar function | Microsoft Docs[^] to convert the Input to a wide string. This must be done in any case; even for a multi byte application.

If you really want your application to be multi byte, you have then to use the WideCharToMultiByte function | Microsoft Docs[^] to convert the wide string created by the above conversion to the required multi byte code page.


这篇关于如何在我的解码QR码应用程序中编码后者?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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