Hex to Ascii conversion

This is a discussion on Hex to Ascii conversion within the C Programming forums, part of the General Programming Boards category; Hi there, It seems that this question has been asked quite a few times. But all previous posts were unique. ...

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    1

    Hex to Ascii conversion

    Hi there,

    It seems that this question has been asked quite a few times. But all previous posts were unique. Anyway, what I would like to know is how would I go by converting a hex string to an ascii string?

    Input a hex string such as: C17070220X!f1d0 9e39 f8ef eb0a

    Ouput the ascii equivalent…

    I have searched the net with now luck…

    Please, any suggestions and guidance will be highly appreciated.

    Thanks.
    Ryno

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    The problem can be broken down into how to turn a string of hexadecimal characters into a list of integral values within the range of the ASCII character set. I know for a fact that the question of how to convert hexadecimal to decimal has been raised before, and from there it's a short leap to a conditional test for the range.
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    494
    Quote Originally Posted by Ryno
    It seems that this question has been asked quite a few times. But all previous posts were unique. Anyway, what I would like to know is how would I go by converting a hex string to an ascii string?
    They might be unique but the basic operation is the same for all of them. If you search the forum im sure you will find what you are looking for.
    When no one helps you out. Call google();

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  2. Ascii to hex and hex to Ascii
    By beon in forum C Programming
    Replies: 1
    Last Post: 12-26-2006, 05:37 AM
  3. Replies: 11
    Last Post: 03-24-2006, 10:26 AM
  4. Header File Question(s)
    By AQWst in forum C++ Programming
    Replies: 10
    Last Post: 12-23-2004, 10:31 PM
  5. ANSI C ASCII String to HEX byte array conversion
    By phyte in forum C Programming
    Replies: 10
    Last Post: 12-14-2004, 07:02 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21