Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted
Updated 26-Jul-18 23:39pm
v2
Comments
Richard MacCutchan 27-Jul-18 5:33am    
You need to use the correct Japanese font to display the characters.

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900