[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to display control characters 0x07-0x0C, 0x0F

From: Brian Raiter
Subject: Re: how to display control characters 0x07-0x0C, 0x0F
Date: Sat, 8 Jan 2005 17:05:01 -0800

>   I'm trying to get my grubby little hands on the full ibm pc
>   character. So far, I've gotten a lot of mileage out of a thread on
>   comp.os.qnx titled "PC character set," but characters 0x07-0x0C
>   and 0x0F still elude me: ncurses won't display them.

Because those are control characters. ncurses is about portability. If
you're trying to examine the characters that are specific to your
terminal, don't use ncurses.

If you're on a Linux console, the easiest thing to do is to put the
console in UTF-8 mode, and then display the characters 0xF000 through
0xF0FF. These special Unicode characters always map to the physical
characters in the current console font. Here's a short Perl script:

#!/usr/bin/perl -w
print "\e\%G";   # select utf-8 mode
for (0x00..0xFF) {
    printf "%02X: ", $_;
    print chr(0xEF),
          chr(0x80 | ($_ >> 6)),
          chr(0x80 | ($_ & 0x3F));
    print $_ % 8 == 7 ? "\n" : "   ";
print "\e\%@";   # select iso mode


reply via email to

[Prev in Thread] Current Thread [Next in Thread]