Problem with displaying ASCII table in mintty
Mark Harig
idirectscm@aim.com
Fri Jun 26 17:36:00 GMT 2009
Fri, 26 Jun 2009 10:50:45 -0400 Mark J. Reed wrote:
> > Is is possible to display the upper 128 entries in the ASCII
> > table in mintty using the 'cygutils' application 'ascii'?
>
> The ASCII table doesn't have an upper 128 entries. Only codes 0
> through 127 decimal are defined by ASCII. Once you hit 128 you're not
> in ASCII anymore, and what you *are* in depends entirely on what code
> page you're using.
>
> 128 through 159 are control characters in Unicode and Latin-1, but
> printable characters in Windows 1252. 160 through 255 are the same in
> Windows 1252, Latin-1, and Unicode, but defined differently in the
> other ISO-8859 and ISO-2022 character sets and Windows code pages.
>
> If you're using UTF-8 (a particular way of representing Unicode
> characters, which are defined as numbers, as concrete bits and bytes),
> then only characters 0 through 127 can be expressed in one byte.
> Characters from 128 to 2047 take two bytes; the rest of the BMP (2048
> through 65536) three bytes per character, and the rest of Unicode
> four bytes per character.
>
> So if you just send the byte with decimal value 128, not preceded by
> the start of a UTF-8 sequence, to a UTF-8 terminal, the terminal will
> reject it as invalid, or display gobbledygook, depending on its error
> handling design.
Thank you for the explanation. I see from the manual page for 'ascii'
provided at http://www.kernel.org/pub/linux/docs/manpages/ that the
ASCII table is as you described (that is, 128 entries only). Do you have
any recommendations about what the utility program /usr/bin/ascii
(in the package 'cygutils') should do? Should it not provide a display
of the values above 128 because they are not part of the ASCII table?
Does it make sense to provide options that handle the values above 128
under the various conditions described above?
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list