I am using sed on Arabic file (utf-8 encoding) like bellow:
sed 's/./& /g' file
and all I get is:
1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
I tried change the LANG variable to
LANG=en_US.UTF-8
but I still get the same "?" output. What is the easiest way to change this without transliterating to English letters?
---------- Post updated at 10:54 AM ---------- Previous update was at 09:54 AM ----------
I solved it.
After setting LANG=en_US.UTF-8, just edit .profile and add these lines:
export LC_NUMERIC=C
export LC_ALL=C
export LESSCHARSET=utf-8
export LC_ALL=$LANG