Results 1 to 3 of 3

Thread: Converting strings to unicode

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    20

    Converting strings to unicode

    I have to turn strings into Unicode. I thought the best way to do this would be as followed

    HTML Code:
    For...Next to get the string
    For...Next to take each character out of the string
    For...Next to display each character in Unicode
    The only problem I have is with the separation on each character in the string. I know I have to use a For...Next loop to check each spot in the string. But how would I move on past the first character?

  2. #2
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Converting strings to unicode

    Something like this, though I am not sure that the encoding is the one you want.

    Code:
            Dim st As String = "Test"
    
            Dim myEnc As New System.Text.UnicodeEncoding
    
            Dim b() As Byte = New Byte() {}
    
            b = myEnc.GetBytes(st)
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2009
    Posts
    20

    Re: Converting strings to unicode

    I get the basic idea, the encoding one you used isn't what I was looking for but I think I can turn it into what I need.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width