Talk:Terminal control/Unicode output: Difference between revisions

(set -- and unset are not the same.)
Line 10:
I can run <code>xterm +u8</code> with UTF-8 locale, and both current awk and shell solutions output garbage. What does it mean, "terminal supports unicode"?
 
:The ZX spectrum basic solution doesn't even make sense: can you display more than 256 different characters on screen at once? If not, what good is this "unicode support"? --[[User:Ledrug|Ledrug]] 03:12, 12 September 2011 (UTC)
Terminal supports unicode means that the terminal supports Unicode output. Not all terminals can do this.
 
: Terminal supports unicode means that the terminal supports Unicode output. Not all terminals can do this.
:The ZX spectrum basic solution doesn't even make sense: can you display more than 256 different characters on screen at once? If not, what good is this "unicode support"? --[[User:Ledrug|Ledrug]] 03:12, 12 September 2011 (UTC)
 
:Yes, the ZX Spectrum can display more than 256 different characters at once. You need to define some switching code though, and you are limited to about 40k usable memory,but that is more than enough to fill the screen. You can even reference the symbol numbers using the listed Unicode symbols, but you would need to code this. The ZX Spectrum was a versatile little machine. FWIW, I used an alternative character set called M5C (one of my own inventions), which I also implemented on IBM compatible computers. This used a 5 bit character set with page switching, and supported many different characters. I will eventually expand and publish updated specifications (because my notes were only partially complete. There are still unused pages that could be implemented. I only implemented what was needed at the time, and the unused pages left room for expansion.)
 
:: 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, 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.
Anonymous user