Binary.dll byte to string

Discussion in 'Questions (Windows Mobile)' started by Basic4Life, Oct 27, 2009.

  1. Basic4Life

    Basic4Life Member Licensed User

    Hello everyone,
    new here and I have a problem, converting byte streams to strings. I am getting wrong letters for non ASCII letters like ä.ö etc. how can i convert these recieved bytes to proper strings using binary.bytestostring library
    ?
     
  2. klaus

    klaus Expert Licensed User

    You should use the BinaryToString object from the Bitwise.dll.
    There you must declare the Bitwise object with:
    Bitwise.New2(1252) this is the Windows ANSI code page
    then you will get the right characters.

    If you want to write to files and read from with a given code page you can use agraham's BytesConverter library that works similar as the standard file instructions. I have used it because I have older files created by VB6 programs and I wanted the new and old files remain compatible.

    Best regards.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice