let me try the codes now
thanks!
Main Topics
Browse All TopicsI would like to know how to convert chinese characters into hex string in vb.net?
thanks a lot!!!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: smalleePosted on 2005-03-07 at 05:20:08ID: 13476140
try this
erStepThro ugh()> Private Sub InitializeComponent()
Label TextBox Button Label Label Label TextBox TextBox TextBox
tion As System.Object
Imports System.Text
Public Class chiutfencoding
Inherits System.Web.UI.Page
Dim UniEnc As UnicodeEncoding = New UnicodeEncoding(True, True)
Dim UTF8Enc As UTF8Encoding = New UTF8Encoding
Dim UTF7Enc As UTF7Encoding = New UTF7Encoding
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.Debugg
End Sub
Protected WithEvents lblInput As System.Web.UI.WebControls.
Protected WithEvents txtInput As System.Web.UI.WebControls.
Protected WithEvents butShowByte As System.Web.UI.WebControls.
Protected WithEvents lblUTF16 As System.Web.UI.WebControls.
Protected WithEvents lblUTF8 As System.Web.UI.WebControls.
Protected WithEvents lblUTF7 As System.Web.UI.WebControls.
Protected WithEvents txtUTF16 As System.Web.UI.WebControls.
Protected WithEvents txtUTF8 As System.Web.UI.WebControls.
Protected WithEvents txtUTF7 As System.Web.UI.WebControls.
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclara
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Private Sub butShowByte_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butShowByte.Click
txtUTF16.Text = ShowByte(txtInput.Text, "UTF-16")
txtUTF8.Text = ShowByte(txtInput.Text, "UTF-8")
txtUTF7.Text = ShowByte(txtInput.Text, "UTF-7")
End Sub
Function ShowByte(ByVal inStr As String, ByVal encode As String) As String
Dim result As String
Dim bArray() As Byte
result = ""
Select Case encode
Case "UTF-16"
bArray = UniEnc.GetBytes(inStr)
Case "UTF-8"
bArray = UTF8Enc.GetBytes(inStr)
Case "UTF-7"
bArray = UTF7Enc.GetBytes(inStr)
End Select
Dim len As Integer = bArray.Length
For i As Integer = 0 To len - 1
result = result & " " & Hex(bArray(i))
Next
Return result
End Function
End Class