Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have some files that using japanese, korean and chinese characters in their filename, this is the example filename

栗山千明 - おいしい季節決定的三分間.rar

but when i tried to ls -w1 *.rar in the yakuake console, it shows as:

æ å±±åæ - ããããå­£ç¯æ±ºå®çä¸åé.rar

my locale output:

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

I'm using Ubuntu Mono font for the console..

Is there a way to fix this?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Well, the problem here is that the console you're using is set up to display hi-bit characters as iso 8859-1 characters instead of as UTF-8 characters. Now the way to change a given terminal to use UTF-8 instead of ISO 8859-1 depends on the exact terminal being used:

  • xterm is told to display utf-8 characters via the -u8 command line option when launching or via the XTERM_LOCALE environmental variable
  • Gnome terminal sets the character set to display characters via Terminal -> Set Character Encoding
  • If logging in to a UNIX machine from PuTTY, change the character encoding by setting Window -> Translation before logging in
  • If not in X and at a Linux console, the setfont command is the one to use, e.g. setfont -m utf-8 or, on older systems, the mapscrn command. More information: http://linux.die.net/man/8/setfont
  • If using some other terminal to get to the console, the procedure will be different

Similar discussion: Characters encodings supported by more, cat and less

share|improve this answer
    
the encoding on yakuake is already UTF-8 (Manage Current Profile > Advanced > Encoding > UTF-8) –  Kokizzu Feb 2 at 3:16
    
ah, by setting export TERM='xterm -u8' it works ^^ thanks –  Kokizzu Feb 2 at 3:18
    
ah wait, i don't even do a thing (adding export TERM), this already work after restarting '___' –  Kokizzu Feb 2 at 3:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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