In the paragraph "Setting the Locale", it is said: "Instead, it is best to set the locale in your user's ~/.profile (or, if you are using a C shell, ~/.login). Note: If you are not sure which file to use, use ~/.profile. Also, if you are unsure which code listing to use, use the Bourne version." Actually, bash doesn't look for a .profile file but for a .bash_profile one instead. Adding the environment variables in the latest one works. Reproducible: Always Steps to Reproduce: 1. 2. 3.
bash does read ~/.profile, but only if you dont have other files in place already from the manpage: When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.
I'm sorry for not reading properly the man page, but I was relying on the FILES section which doesn't mention ~/.profile ... And from reading it carefully, here's another little problem: "If bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible, while conforming to the POSIX standard as well. When invoked as an interactive login shell, or a non-interactive shell with the --login option, it first attempts to read and execute commands from /etc/profile and ~/.profile, in that order." I'm not on my gentoo box right now, but I'm pretty sure I had the ~/.bash_profile file created by bash on my first login (which would explain why I had that issue with the ~/.profile one). I think it would be a good idea to notify bash users that they should add the environment variables in both files, so whether they invoke bash or sh, unicode is used. That is, while it's not recommended by devs to put them in /etc/profile.
I'm pretty sure that I had to create a .bash_profile in Gentoo (Not the case with other Distros like RH or Fedora) and by default, there was NO .bash_profile in my home directory...
you both are almost correct /etc/skel/ contains a .bash_profile ... that means if you use a utility such as `useradd` to create your user, the file will be automatically copied to your $HOME/ ... however if you create the user manually, the file will probably not be auto copied to your $HOME the reason we do not recommend using /etc/profile is that: (1) that is a global file which affects all users on your box (2) that file will be constantly updated by baselayout and trigger `etc-update` merges with it which could easily cause your change to get lost :/
Created attachment 59820 [details, diff] utf-8.xml.diff this should fix all of the aforementioned problems
Created attachment 60134 [details, diff] utf-8.xml.diff sorry, the last one wasn't word-wrapped correctly... this one is
Fixed in CVS.