I am writing a program with special characters in it. Characters like װאבדג (hebrew).
Using some Ubuntu I had handy here I could get them to work inside the X environment (inside gnome-terminal). In rxvt, I get strange characters instead of what I have in the file; and in bare xterm I get some of them.
The file itself may be just as simple as
letters="⅄ႥႣႬזלבגװאבדגהוזחטענסףמלךלכפץצקႠႣႤႥႬႫႹჄႾႨ"
letters=$(echo $letters | sed -e 's/./\0\n/g')
letters=$(for i in $letters; do echo "$RANDOM$i" done | sort -rn | sed -e 's/[0-9]*//g')
echo $letters
In OS X it just shows "nnnnnnnnnnnnnnnnnnnn".
Within the tty without X.Org started, it just shows a diamond.
In all the terms, I have
LANG=es_ES.UTF-8
Is there any way to know within the script if the chars will be shown correctly (I could implement some fallback if so), or if we can set the terminal to show it.