borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (I really need some help here)Next Topic (Can anybody help me?) New Topic New Poll Post Reply
AndreaVB Forum : Non-English ONLY : UNICODE, UTF8
Poster Message
arturozg
Level: Guest


icon UNICODE, UTF8

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

13-12-2003 at 02:27 AM
| Quote Reply
pc888
Level: Graduate

Registered: 02-01-2004
Posts: 12
icon Re: UNICODE, UTF8

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

02-01-2004 at 09:16 PM
View Profile Send Email to User Show All Posts | Quote Reply
pc888
Level: Graduate

Registered: 02-01-2004
Posts: 12
icon Re: UNICODE, UTF8

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.

02-01-2004 at 11:05 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Non-English ONLY : UNICODE, UTF8
Previous Topic (I really need some help here)Next Topic (Can anybody help me?) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder