Results 1 to 4 of 4

Thread: ÅÄÖ from Byte Array to String ?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2002
    Posts
    23

    ÅÄÖ from Byte Array to String ?

    How can i get an byte array with åäö to string ?.

    I tried like 20 diffrent ways...

    The incoming data are in ASCII format.

    I either get "?" or "†"

    For intIndex = offset To offset + count - 1
    txt = txt + Microsoft.VisualBasic.ChrW(Bytes(intIndex))
    Next

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Would something like this work for you !
    VB Code:
    1. Dim bytarray As New ASCIIEncoding
    2. bytarray.GetBytes(yourstring) 'byte array

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2002
    Posts
    23

    You got i t wrong..

    i Need to convert from bytearray to string. not string to byte..

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    First , I wouldn't recommend classes in VisualBasic namespace . They are all for backward compatibility only with upgraded VB6 proj files .

    have a look here .http://msdn.microsoft.com/library/de...ringTopic2.asp

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