2

Ubuntu shows filenames in Thai language incorrectly.

image

$ locale
LANG=th_TH.UTF-8 
LANGUAGE= 
LC_CTYPE="th_TH.UTF-8" 
LC_NUMERIC="th_TH.UTF-8" 
LC_TIME="th_TH.UTF-8" 
LC_COLLATE="th_TH.UTF-8" 
LC_MONETARY="th_TH.UTF-8" 
LC_MESSAGES="th_TH.UTF-8" 
LC_PAPER="th_TH.UTF-8" 
LC_NAME="th_TH.UTF-8" 
LC_ADDRESS="th_TH.UTF-8" 
LC_TELEPHONE="th_TH.UTF-8" 
LC_MEASUREMENT="th_TH.UTF-8" 
LC_IDENTIFICATION="th_TH.UTF-8" 
LC_ALL=  

$ locale -a
C
C.UTF-8 
en_US.utf8 
POSIX 
th_TH.utf8
  • 1
    Take a note, that you are using putty's terminal. Maybe it is not ubuntu's issue but putty's – Gryu Jan 24 at 18:57
  • Also, show us what locales do you have: locale and locale -a commands outputs are desirable. – Gryu Jan 24 at 19:32
  • In which configuration file did you set LANG to th_TH.UTF-8? – Gunnar Hjalmarsson Jan 26 at 10:22
0
  1. As suggested in one of this question's answer:

Inside a terminal emulator that supports UTF-8, you can use the luit command to run a subshell (or other program) in a different locale. The locale setting that indicates character sets is LC_CTYPE.

LC_CTYPE=ru_RU.KOI8-R luit ls   # run one command
LC_CTYPE=ru_RU.KOI8-R luit      # start a shell (type Ctrl+D or exit to return to the parent shell)
  1. You could try to set for your putty's session: PuTTY Configuration Session Window Translation Remote character set: UTF-8

    putty's encoding settings

  2. This answer suggests to change Connection > Data > Terminal-type string to putty instead of xterm.

  3. Changing your locale is suggested in this guide:

    sudo update-locale LANG=<name of locale here>
    
    user@ubuntu:~/ $ cat /etc/default/locale 
    LANG=en_US.UTF-8
    user@ubuntu:~/ $ sudo update-locale LANG=uk_UA.utf8
    [sudo] password for user: 
    user@ubuntu:~/ $ cat /etc/default/locale 
    LANG=uk_UA.utf8
    

In your case you could use th_TH.UTF-8

In my case putty displays Thai's encoding correctly even with xterm in Terminal-type string parameter:
putty's thai symbols

Locale in windows:

Current language for non-Unicode programs: English (United States)

  1. Try putty's alternatives.

Update: We've tried to create a file with a name in Thai's encoding and it is displayed as expected - in Thai's encoding. But old file with name in Thai's encoding is displayed incorrectly. So we suggested the issue could be with how ftp server processes files in Thai's encoding.

  1. Take a note what program or service writes changes to disk and how it encodes symbols in files' names with your encoding.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.