How can I translate from UTF8 character set to ASCII in Vb.
How can I display a character encoded as u8054?
How can help me
How can say an algoritm, or a easy vb4 visula basic code?
Thanks
Arturo
You will need an input textbox (textbox1) where you type in a four-digit unicode (in hexadecimal) and press the translate button (button1). The unicode character will be displayed in the textbox after the hex-code. The code to add is as follows:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text.Length = 4 Then 'code completed
' define unicode as integer (from Hex input)
Dim intCode As Integer = CInt("&H" & TextBox1.Text)
' display code together with hex-code
TextBox1.Text &= vbTab & ChrW(intCode)
End If
End Sub
Oh, I forgot to mention that if your code to be displayed is an Eastern Asian character, on XP, you'd need to install the support for these characters. You could follow detailed instructions at the following site: http://www.biblioscape.com/tips/tip_020318.htm
The code u8054 if it was in hex, it falls into the Chinese character range and will definitely require the above installation.
If you're using W98, you can do the same with WindowsUpdate.
Hope this helps.