how can i convert
Hex UTF-8 bytes -E0 A4 A4 to hex code point - 0924
ref: http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=e0+a4+a4&mode=bytes
I need this because when i read Unicode data in c# it is taking it as single byte sequence and displaying 3 characters instead of 1,but i need 3 byte sequence(read 3 bytes and display single character),I tried many solutions but didn't get the result.
If I can display or store a 3-byte sequence utf-8 character then I don't need conversion.
senario is like this:
string str=getivrresult();
in str I have a word with each character as 3 byte utf-8 sequence.
Edited:
string str="त";
//i want it as "त" in str.
Character त
Character name DEVANAGARI LETTER TA
Hex code point 0924
Decimal code point 2340
Hex UTF-8 bytes E0 A4 A4
Octal UTF-8 bytes 340 244 244
UTF-8 bytes as Latin-1 characters bytes à ¤ ¤
Thank You.
Enter bytes of UTF-8, represented in hexadecimal, to get the corresponding Unicode code point. Enter a hexadecimal Unicode code point, in free format, and it will be converted into the corresponding UTF-8 bytes. For users who need to decipher errors, this converter passes through surrogates (Unicode code points from U+D800 to U+DFFF).
This online tool constructs UTF8-encoded characters from the given code point values. The Unicode standard defines code points (also known as code positions) as numeric values that are uniquely assigned to every possible character. To construct UTF8-encoded characters from the input code points, you must specify the numeric base of the code points.
The code point to UTF-8 converter displays the UTF-8 bytes corresponding to values up to this maximum value for four bytes, but it does not allow values resulting in more than four bytes of UTF-8 output. It will only process up to six hexadecimal digits.
Use Two Digits per Hex Value If hex value is a single digit, append a 0 before it, so that it's two digits. You can pass input to this tool via ?input query argument and it will automatically compute output. Here's how to type it in your browser's address bar. Click to try! Quickly convert ASCII characters to hexadecimal numbers.
Use the GetString
methdod in the Encoding
class:
byte[] data = { 0xE0, 0xA4, 0xA4 };
string str = Encoding.UTF8.GetString(data);
The string now contains one character with the character code 0x924.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With