Click here to Skip to main content
14,975,234 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have written a code which converts hexadecimal to unicode character. While some of arabic/chinese characters are displaying properly, many of them are displayed as boxes.

Code Snippet:
Dim textLength As Integer
Dim charValue As Char
textLength = Int32.Parse(asciiText,System.Globalization.NumberStyles.HexNumber)
charValue = System.Convert.ToChar(textLength)
txtASCII.Text = txtASCII.Text + charValue.ToString

If, here I pass asciiText=0631, it converts into arabic character.
but if i pass asciiText= 0600, it converts into square box.

Also, if i copy-paste the box generated in the word document, it displays arabic language again.

Font in VB application is 'Microsoft Sans Serif' and Language is 'Default'

Can anyone suggest how to solve this problem?
Thanks in advance.
Updated 27-Oct-10 2:32am
Sandeep Mewara 27-Oct-10 8:33am
Use PRE tags to format code part. It makes the question readable.

1 solution

Use a font that supports that characters!
P.S. There is no font that supports all characters.

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