Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: Displaying non-printable characters on a SPARC (or any other Unix system) Message-ID: <5663@goanna.cs.rmit.oz.au> Date: 9 May 91 04:11:54 GMT References: <6197@mahendo.Jpl.Nasa.Gov> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 36 In article <6197@mahendo.Jpl.Nasa.Gov>, robert@nereid.jpl.nasa.gov (Robert Angelino) writes: > I'm writing some code that utilizes a primitive tty interface. > I would like to display non-printable characters on my > unix system. If they _are_ "non-printable" characters, what do expect them to display AS? If you are writing to a terminal, read your terminal manual. If you are writing to the console, read your Sun manuals. Tip: SunOS 4.something supports 8-bit characters, and comes with (at least some) fonts for the ISO 8859/1 character set. > I've found out (through tracing) that the following clears the screen: > print("\33[H\33[2J"); (this also happens to work on VMS) > As you can see this is not what I would call intuitive. What do you mean, it's not intuitive? You send the home-clear sequence to a terminal, what do you EXPECT it to do? What's more, this is documented at tedious length in The Fine Manuals. Start with "man 1 suntools" and take it from there. > Has anyone out there discovered how I can go about doing this using > simple printf statements?? But you haven't told us what you want to *DO*. If you do not want ESC to be recognised as part of a terminal control escape sequence, do you want it to be displayed as a house, a boat, a picture of Queen Victoria, or what? The IBM PC assignments of pictures to codes is _not_ generally available on other machines (I was enchanted to discover that the upper 128 characters on an Atari 520-ST included Hebrew letters). It is not an exaggeration to describe SunOS as "copiously" documented. There are several introductory manuals. Go read them. -- Bad things happen periodically, and they're going to happen to somebody. Why not you? -- John Allen Paulos.