Terminal control/Unicode output: Difference between revisions

Content added Content deleted
Line 4:
 
=={{header|AWK}}==
 
{{improve|AWK|Should also check LC_ALL and LC_CTYPE.}}
<lang awk>#!/usr/bin/awk -f
BEGIN {
unicodeterm=1 # Assume Unicode support
if (ENVIRON["LANGLC_ALL"] !~ "UTF")
do
if (ENVIRON["LC_CTYPE"] !~ "UTF")
do
if (ENVIRON["LANG"] !~ "UTF")
unicodeterm=0 # This terminal does not support Unicode
done
done
 
if (unicodeterm)
do
# This terminal supports Unicode