Talk:Terminal control/Unicode output: Difference between revisions

set -- and unset are not the same.
m (Locales and terminal capabilities)
(set -- and unset are not the same.)
Line 19:
 
There are some other problems with the Unix shell solution. It uses a non-portable construct "set --" instead of "unset". I will try to find why this construct was used instead of "unset" (which is more portable). Maybe we need two versions here. I am investigating this. [[User:Markhobley|Markhobley]] 15:48, 12 September 2011 (UTC)
 
: <code>set -- "$LANG"</code> and <code>unset "$LANG"</code> are not the same. I am using <code>set -- "$LANG"</code> to assign the positional parameters, so "$1" expands to the same value as "$LANG". A program would use <code>unset "$LANG"</code> to unset the variable named en_US.UTF-8 (if "$LANG" expanded to en_US.UTF-8), but there is probably no variable named en_US.UTF-8, so <code>unset "$LANG"</code> would probably do nothing.
 
: [http://www.in-ulm.de/~mascheck/bourne/index.html ''The Traditional Bourne Shell Family: History and Development''] claims that <code>set --</code> appears in System III. Later, <code>unset</code> appears in System V Release 2 (SVR2). Shell functions, like <code>unicode_tty() { ... }</code>, also appear in SVR2. I expect that today's shells have SVR4 features. --[[User:Kernigh|Kernigh]] 18:04, 12 September 2011 (UTC)
 
==Locales and terminal capabilities==
Anonymous user