CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2001
    Posts
    93

    Convert Binary text to regular text

    How do you convert a binery text to a regular text?


  2. #2
    Join Date
    Jun 2001
    Location
    Memphis, TN
    Posts
    146

    Re: Convert Binary text to regular text

    I'm not sure I understand what you mean... if you are trying to do this for string comparisons you can add the line..


    option Compare Text




    ...to the top of your module. then all text being compared is used case-insensitive as opposed to the case-sensitive "Option Compare Binary". I hope this is in the right direction of what you are looking for! good luck!

    jeff


  3. #3
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Convert Binary text to regular text

    Here you find Iouri make it reverse (from text to binary). You can reverse it to get what you want:
    http://codeguru.com/cgi-bin/bbs/wt/s...age=0&Limit=25

    However, if binary number is ascii number, after you convert it in decimal, simply pass it to CHR() function...


    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
    and all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

    The Rater
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  4. #4
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Not number but text!

    Sorry, I did not see it was "binary text". Did you mean how to read a binary file? Here is the solution:

    http://codeguru.com/cgi-bin/bbs/wt/s...age=0&Limit=25

    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
    and all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

    The Rater
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  5. #5
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Convert Binary text to regular text

    You can use the StrConv function to do that, which can convert a byte array to a string, or the other way around. For that, you must specify the vbToUnicode of vbFromUnicode parameter.

    Tom Cannaerts
    [email protected]
    Moderator on http://www.vbcodelibrary.co.uk/board

    A bottomless pit, I'm sure it came with the place, who would dig one on purpose?
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

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

Featured