I have a machine with Linux Mint Debian Edition 2 "Betsy" (installed as RC, with all available updates applied) and MATE desktop environment. My problem is that in some applications special characters used in my mother tongue (Polish) and, as I have some folders and files containing are not handled correctly.
To be more specific: in mate-terminal, pluma (MATE text editor) and caja (file manager) and probably a few others I just didn't happen to check, any Polish special characters normally typed by Alt+letter are either ignored (no character printed -- in pluma and caja) or replaced with a question mark (in mate-terminal). Even vim, when run in mate-terminal, behaves this way, i.e. replaces special characters with question marks.
I don't think this is a system-wide problem. Why? Because when I switch to another tty and try to input those special characters in the terminal I encounter no problems. The same folder which by mate-terminal is displayed as
zdj?cia in another tty is correctly labeled
zdjęcia. It looks as though the problem is MATE-specific, since vim, when run in terminator, doesn't cause any problems.
Furthermore, I've tried debugging this in the following manner: in mate-terminal I listed my home directory (containing files and directories with Polish special characters) and redirected
ls output to a test file. Then I switched to another tty and
cat the test file -- the characters were printed correctly.
I've already tried
dpkg-reconfigure locales. Language packs have been installed (and reinstalled in the process) via MATE Control Centre.
What do I try next?
mate-terminal in graphical environment:
$ locale locale: Cannot set LC_ALL to default locale: No such file or directory LANG=en_GB.UTF-8 LANGUAGE= LC_CTYPE="en_GB.UTF-8" LC_NUMERIC=\"pl_PL.UTF-8\" LC_TIME=en_GB.UTF-8 LC_COLLATE="en_GB.UTF-8" LC_MONETARY=\"pl_PL.UTF-8\" LC_MESSAGES="en_GB.UTF-8" LC_PAPER=\"pl_PL.UTF-8\" LC_NAME=\"pl_PL.UTF-8\" LC_ADDRESS=\"pl_PL.UTF-8\" LC_TELEPHONE=\"pl_PL.UTF-8\" LC_MEASUREMENT=\"pl_PL.UTF-8\" LC_IDENTIFICATION=\"pl_PL.UTF-8\" LC_ALL=
In tty1 (where character encoding works fine):
$ locale LANG=en_GB.UTF-8 LANGUAGE=en_GB:en LC_CTYPE="en_GB.UTF-8" LC_NUMERIC=pl_PL.UTF-8 LC_TIME=en_GB.UTF-8 LC_COLLATE="en_GB.UTF-8" LC_MONETARY=pl_PL.UTF-8 LC_MESSAGES="en_GB.UTF-8" LC_PAPER=pl_PL.UTF-8 LC_NAME=pl_PL.UTF-8 LC_ADDRESS=pl_PL.UTF-8 LC_TELEPHONE=pl_PL.UTF-8 LC_MEASUREMENT=pl_PL.UTF-8 LC_IDENTIFICATION=pl_PL.UTF-8 LC_ALL=
grep -Rs pl_PL /etc ~/.?* yields, after removing "Binary file x matches pattern" and piping through
sort | uniq:
/etc/default/locale /etc/locale.alias /etc/locale.gen /etc/mdm/locale.conf /home/marta/../marta/.bash_history /home/marta/../marta/.config/user-dirs.locale /home/marta/../marta/.linuxmint/mintMenu/apt.cache /home/marta/../marta/.pam_environment /home/marta/../marta/.xsession-errors /home/marta/.bash_history /home/marta/.config/user-dirs.locale /home/marta/.linuxmint/mintMenu/apt.cache /home/marta/.pam_environment /home/marta/.xsession-errors
Yes, the computer's not actually mine, but never mind :)
Yet another EDIT:
The contents of files containing locale settings:
$ cat /etc/default/locale LANG="en_GB.UTF-8" LANGUAGE="en_GB:en" LC_NUMERIC="pl_PL.UTF-8" LC_TIME="en_GB.UTF-8" LC_MONETARY="pl_PL.UTF-8" LC_PAPER="pl_PL.UTF-8" LC_IDENTIFICATION="pl_PL.UTF-8" LC_NAME="pl_PL.UTF-8" LC_ADDRESS="pl_PL.UTF-8" LC_TELEPHONE="pl_PL.UTF-8" LC_MEASUREMENT="pl_PL.UTF-8"
$ cat /home/marta/.pam_environment LC_NUMERIC="pl_PL.UTF-8" LC_TIME=en_GB.UTF-8 LC_MONETARY="pl_PL.UTF-8" LC_PAPER="pl_PL.UTF-8" LC_IDENTIFICATION="pl_PL.UTF-8" LC_NAME="pl_PL.UTF-8" LC_ADDRESS="pl_PL.UTF-8" LC_TELEPHONE="pl_PL.UTF-8" LC_MEASUREMENT="pl_PL.UTF-8"
$ cat /home/marta/.config/user-dirs.locale pl_PL