|
-
March 7th, 2014, 07:52 AM
#4
Re: How convert bytes to ASCII?
Hi proxy,
I think that you are getting confused.
The utility you've mentioned was designed to decode various date/time values found embedded within binary and other file types.
That is the why your output is formatted as a date/time result with time-zone abbreviation.
The way to convert UTF-8 to ASCII is straight forward as UTF-8 was designed for backward compatibility.
For that reason UTF-8 only uses one-byte codes for ASCII values 0 through 127 which allows you to display the same character as the ASCII equivalent (and vice versa) when using this range.
For example:
UTF-8 Encoded Byte 0x41 = The capital letter 'A'
=
Unicode code point U+0041 = The capital letter 'A'
=
ASCII 0x41 = The capital letter 'A'
Any UTF-8 code point larger than 127 are represented by multi-byte sequences and will be lost when you attempt to convert it to ASCII as there is no equivalent character to display. These characters are usually replaced with a question mark.
Best regards,
Doron Moraz
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|