1

I have a file I've called æøå.js (just an example), and when I run ls in the directory where it's stored I get

root@chu:~/projects/someproject/server# ls src
a.js  b.js  ??????.js

So it seems such symbols can't be displayed. PuTTY is set to expect UTF-8, and my env looks like this

TERM=xterm
SHELL=/bin/bash
USER=root
LANG=en_GB.UTF-8
SHLVL=1
HOME=/root
LANGUAGE=en_US:en
LS_OPTIONS=--color=auto
PYTHONPATH=:/root/pymodules
LOGNAME=root
_=/usr/bin/env

(I've removed some stuff from that output since they can't possibly be relevant anyway)

But here's the thing; When I open a file with vim then I can type and see all those symbols without a problem. So the problem is apparently just in the shell/bash. Are there any settings I can supply that will allow bash to display those symbols? Can someone also explain why it doesn't work now, with UTF-8?


Edit: This is how tree displays æøå.js

|-- src
|   |-- a.js
|   |-- b.js
|   `-- \303\246\303\270\303\245.js
Hubro
  • 6,016

1 Answers1

8

As I already explained, twice, in our earlier discussion, the problem is that your locale configuration is pointing to a nonexistent locale.

Your environment including $LANG is okay; however, the en_GB.UTF-8 locale must be generated.

On most distributions (including Debian):

  1. Open /etc/locale.gen in a text editor.
  2. Uncomment the en_GB.UTF-8 line by removing the leading #.
  3. Run locale-gen as root.

On Debian:

  1. Run dpkg-reconfigure locales as root.
  2. Scroll down to the "en_GB.UTF-8" entry, mark it with Space.
  3. Select OK with Tab, Enter.

Also, for the record, ls is a separate program; it is not part of bash.

grawity
  • 501,077