On Fri, Nov 09, 2001 at 06:28:27PM +0000, Markus Kuhn wrote: > On Thu, 8 Nov 2001, Daniel Yacob wrote: > > Is there a way to detect if the terminal that a script is running in > > can display UTF-8 text? > > No, not by communicating with the terminal directly. There is > neither a practical method that doesn't involve asking the user > for what she can see, nor is there a recommendable formal > standard solution.
I think that "displaying UTF-8 text" is quite a difficult task. Not only would you need a really large font -- both a number of glyphs (or an ingenious font switching scheme), and to support the most intricate CJK glyphs I hear that at least a 20pt font is required. Moreover, the old way of thinking "one codepoint, one box" isn't going to work with combining characters (and keeping on piling the combining characters pushes the capabilities of the font rendering). Don't forget ligatures, and I do not mean only the Latin ones: think Arabic, or Indic. Add to that bidi, and we are getting close to the question "can any program honestly display Unicode without any buts and ifs"? Something that might come the closest (sorry to mention this, but if you have an issue with this, don't blame me, and please prove me wrong) is Microsoft Word, but even then only if you have the right localization kits (or whatever is the right term for that in MS-speak) installed. Mind, I would be (plesantly) surprised if there really is a 'terminal' that can justice to the intricacies of Unicode. At the time the Plan 9's 9term probably was close, but Unicode has moved on since. On an xterm, sure, you can have the fonts, but probably not the combining characters. Yudit, ditto. -- $jhi++; # http://www.iki.fi/jhi/ # There is this special biologist word we use for 'stable'. # It is 'dead'. -- Jack Cohen -- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/