Click here to Skip to main content
13,352,157 members (77,066 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 19:09pm
Updated 23-Dec-12 20:24pm

1 solution

Rate this: bad
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.


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.180111.1 | Last Updated 24 Dec 2012
Copyright © CodeProject, 1999-2018
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