-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core installation should set proper locale for Unicode characters. #85
Comments
That almost certainly should go into the install, probably in post-common. I'll look into it. Thanks for figuring this out! Do you have to set LANG when you enter the chroot later, or does it grab it by default? |
I had to run |
I'm on Precise. I've pieced these commands from a number of StackOverflow posts so YMMV. LANG seems to get set automatically now that the locale is generated. |
Also, do not forget to set "LC_ALL=en_US.UTF-8". |
I haven't had any issues with LC_ALL not set. What does it fix? |
Depends on order, so it preferable to be set explicitely. Not everyone lives in the US or uses the english language as the default. Example of /etc/default/locale:
See for an additional info - https://help.ubuntu.com/community/Locale |
A work around I've done is to put my LANG= and LC_ALL= in my home .profile and .bashrc use export in front of if necessary. set and printenv show them set. When I did the standard global profile commands (for debian/ubuntu), I got "POSIX" for all of the variables. |
Fixed in master, thanks to @x3qt. |
The problem persists, and it's a bit different to solve it on Debian sid:
That should do it. Happy chrooting! |
As there was no file /etc/locale.gen in the default install of Debian sid (xfce4), I solved this issue as follows:
|
I battled with Unicode character issues for about a week and found the solution to my troubles. My chroot installation is the core package and I use Crosh Window to login. I use ZSH as my shell with Oh-My-ZSH and the default theme has a Unicode arrow next to the command line. Tab completion would duplicate the text on the screen until I found that the locale was not set. Running:
sudo locale-gen en_US.UTF-8 UTF-8 sudo update-locale LANG="en_US.UTF-8"
Will fix the issue for good. I'm not sure if it's possible to include this fix in the installation or at least document the issue for other users.
The text was updated successfully, but these errors were encountered: