home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.unix.geeks      The gathering of the socially-retarded      298 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 29 of 298   
   ivan to All   
   Re: ASCII hexadecimal number to characte   
   16 Feb 04 18:27:28   
   
   From: bluehat@bellsouth.net   
      
   Stéphanie Vanhove wrote:   
   > Hello,   
   >   
   > Does anyone know a way to convert a hexidecimal number to its corresponding   
   > ASCII character?   
   > Eg. with a regular expressoin in vi, or with sed, or with tr , or something   
   > else ...   
   >   
   > Please help!   
   >   
   >   
   Did you get help?   
   Or are you still looking for help with this.   
   I wrote a C function to do this, I call it htoa (hex-to-ascii).   
   The algorithm is simple. Add 0x30 to the hexadecimal digit if   
   it is between 0 and 9, if it is between A and F, then add 0x40,   
   and if it is between a and f, then add 0x60.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca