Talk:Terminal control/Unicode output: Difference between revisions

m
m (moved Talk:Terminal Control/Unicode output to Talk:Terminal control/Unicode output: the other terminal control tasks are capitalised this way)
Line 17:
 
:: Which part in the examples do you actually verify your terminal "can do this"> Checking <code>LC_*</code> has almost nothing to do with underlying tty device's capability, and for what it's worth, the awk and shell examples don't even check if output device is a terminal, it could be a file or the bit bucket for all they care. I just don't see how this is a terminal related work. --[[User:Ledrug|Ledrug]] 19:05, 12 September 2011 (UTC)
 
::: Yeah, checking locale is the current method for determining output type (on a Unix system). There is also termcap, but this has no information on Unicode support AFAIK. Applications should all obey locale, so if the locale says use Unicode, then yay. If not, nay. The locale should always be configured for the terminal, so a session on a Unicode terminal would have a Unicode compatible locale set. On a conventional Ascii compatible terminal the locale would differ. With regards to files and bit buckets, again locale is the boss wrt output. I'm not aware of any other mechanisms for checking terminal type. [[User:Markhobley|Markhobley]] 20:21, 4 November 2012 (UTC)
 
Yeah, the printf may not work on some systems. I am working on some Unicode compatible helper programs which will be guaranteed to produce the appropriate Unicode output from shell scripts, etc. This in on my todo list.