Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP Javascript
I need to convert ascii characters to hex and the hex to ascii characters.
 
Example:-- तेस्त+' ' to hex value %924%947%938%94D%924%20(0924 0947 0938 094D 09240020)
and hex value %924%947%938%94D%924%20(0924 0947 0938 094D 09240020) to तेस्त
 
Can any body help me either in ASP classic or JavaScript?
Posted 23-Dec-12 18:09pm
Edited 23-Dec-12 19:24pm
v7

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The question is the total absurd. You cannot "convert" Devanagari to "hex", and "hex" to Devanagari simply because Devanagari is not encoding, and "hex" is not encoding. By the same reason, you cannot "convert" either of that to Unicode of else. They are not any data of file formats, or something like that.
 
Moreover, even Unicode is not encoding, but different Unicode UTFs are. In other words, there is more than one way to write some characters in Unicode; but all of the ways are equivalent.
 
Not that this is possible or, not, the whole idea makes no sense.
 
First, you need to learn some very, very basic notions of computing. I don't even clearly understand what do you miss, but something very basic. Then you need to learn what Unicode is. Just read on the topic. And this can be very difficult, because I'm afraid you don't understand what is "text", "binary", etc. Probably, by "hex" you mean text presentation where each code point is expressed as a word of a number of hexadecimal digits, that is, characters. But, as I say, it depends on what UTF is this. You should understand what you want and why, and then ask a correct question.
 
And, by the way, I see absolutely no practical reason of transcoding Unicode text in some UTF (better be UTF-8) into anything else. However, if you do it for the purpose of learning — my respect. In this case, you will see everything as a result of your experiments.
 
—SA
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.141022.1 | Last Updated 24 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100