Skip to content
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

jessie chroot does not have en_US.UTF-8 #534

Closed
darcyparker opened this issue Dec 14, 2013 · 18 comments
Closed

jessie chroot does not have en_US.UTF-8 #534

darcyparker opened this issue Dec 14, 2013 · 18 comments
Labels

Comments

@darcyparker
Copy link

This may be similar to #85 ?

I installed a jessie debian chroot and struggled with term issues. It turned out that $LANG=C. locale -a showed that C.UTF-8 was available but it wasn't the default... and en_US.UTF-8 was not installed. (Not having UTF-8 of course caused many problems with vim and especially things running inside tmux.

I worked around this by:

sudo apt-get debconf locales
dpkg-reconfigure locales

In the ncurses gui, I was able to install and set en_US.UTF-8 as my default. This resolved my term issues.

@thewtex
Copy link

thewtex commented Dec 24, 2013

Verified.

Thanks for instruction set. update-locales did not work, but dpkg-reconfigure locales does.

@dnschneid please consider adding this to the default installation.

@dnschneid
Copy link
Owner

Okay, so if I understand correctly: locale -a | grep -i 'en_us.utf-\?8' will report something if the situation is good.
Taking the update-locales line in the core target and replacing it with dpkg-reconfigure (which probably itself calls update-locales) fixes the situation on jessie.

@darcyparker
Copy link
Author

Yes - that's correct. locale -a | grep -i 'en_us.utf-\?8' should report something (ie en-US-utf8) if installed correctly.

@dpl0
Copy link

dpl0 commented Dec 11, 2014

Hello, I just wanted to thank you guys for this!
I had the exactly same issue, I now can run tmux+vim perfectly :)

@darcyparker
Copy link
Author

@dplbsd - no problem. Glad it worked. vim+tmux has been working really well for some time since I figured this out. I look forward to getting this in the default installation so I don't have to do it manually. But fortunately I am not re-recreating my chroot frequently.

@dnschneid
Copy link
Owner

Just pushed a branch localegen that does this, if you'd like to test it out.

@dnschneid
Copy link
Owner

Fixed in the latest crouton.

@thewtex
Copy link

thewtex commented Jan 6, 2015

Thanks!

@darcyparker-ptc
Copy link

Nice - looking forward to trying next time I build a new chroot.

@DennisLfromGA
Copy link
Collaborator

sudo apt-get debconf locales
dpkg-reconfigure locales

A little late to the party but I think it should be:

sudo apt-get *install* debconf locales
*sudo* dpkg-reconfigure locales

@darcyparker
Copy link
Author

@DennisLfromGA - yep you're right. It was a typo on my part. But hopefully no one stumbled long and figured it out. Fortunately the workaround isn't required anymore though.

@sirosen
Copy link

sirosen commented Nov 11, 2015

I hate to raise an old issue from the dead, but has there been a regression?
I just had this issue with the latest crouton and a fresh jessie chroot.
The locales package was missing entirely.

Installing locales, running dpkg-reconfigure locales, and then restarting the debian chroot resolved it.

Some diagnostic info which may be of use:

chronos@localhost ~ $ sh Downloads/crouton -V
crouton: version 1-20151104200003~master:2a1fc9da

Running in a jessie chroot built with xiwi, xfce, and keyboard targets.

@darcyparker
Copy link
Author

Yes, I think there was a regression. I am using Debian stretch and seeing the issue again...

For me it hasn't been a big deal... Here's the script I use to automate most of my remaining setup after I build a new chroot (with the lines related to this issue's workaround marked):
https://gist.github.com/darcyparker/992a09589e51eb0f20d4#file-chrootpostinstall-sh-L398-L399

This issue should be looked at again though...

@dnschneid dnschneid reopened this Nov 15, 2015
@leewc
Copy link

leewc commented Jan 8, 2016

I ran the fix suggested by DennisLFromGA (install debconf locals then reconfigure), and restarted the chroot by exiting and entering the chroot, the issue still appears to be not fixed, as show below, I am unable to display Chinese characters. Will hunt around for a fix ASAP.

Here's some terminal output:

crosh> shell
chronos@localhost / $ ls
bin  debugd  dev  etc  home  lib  lib64  lost+found  media  mnt  opt  postinst  proc  root  run  sbin  sys  tmp  usr  var
chronos@localhost / $ sudo enter-chroot
Entering /mnt/stateful_partition/crouton/chroots/theia...
(theia)wclee@localhost:~$ sudo apt-get install debconf locales
[sudo] password for wclee: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
debconf is already the newest version.
locales is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
(theia)wclee@localhost:~$ sudo dpkg-reconfigure locales
Generating locales...
  en_US.UTF-8... up-to-date
Generation complete.
(theia)wclee@localhost:~$ cd ~/Downloads
(theia)wclee@localhost:~/Downloads$ ls
4061                            Screenshot 2016-01-06 at 5.57.15 PM.png
Eng???????????????[test]???????????????.txt

(theia)wclee@localhost:~/Downloads$ exit
logout
Unmounting /mnt/stateful_partition/crouton/chroots/theia...
Sending SIGTERM to processes under /mnt/stateful_partition/crouton/chroots/theia...
chronos@localhost / $ sudo enter-chroot
Entering /mnt/stateful_partition/crouton/chroots/theia...
(theia)wclee@localhost:~$ cd ~/Downloads/
(theia)wclee@localhost:~/Downloads$ ls
4061                                                                    Screenshot 2016-01-06 at 5.57.15 PM.png
Eng???????????????[test]???????????????.txt

@DennisLfromGA
Copy link
Collaborator

Please re-open if this issue is still a concern.

@fizxmike
Copy link

Can confirm problem still exists in vanilla install using:
sudo sh ~/Downloads/crouton -r jessie -t gnome-desktop,extension,audio
Fix from DennisLFromGA worked:

sudo apt-get install debconf locales
sudo dpkg-reconfigure locales


Best,
Michael

@DennisLfromGA
Copy link
Collaborator

@fizxmike,

Can confirm problem still exists in vanilla install using:

Are you getting error or warning messages and if so what are they?

I thought this had been addressed in the core#L119 target.

-DennisL

@leewc
Copy link

leewc commented Nov 23, 2016

If you're interested I wrote a post about how to fix and install Unicode on
the vanilla install.

https://leewc.com/articles/unicode-crouton-how-to/

That's relevant to en_US.UTF8 as we're looking for UTF8 support.

The basic gist is

 sudo apt-get install language-selector-gnome
 gksu gnome-language-selector
 sudo locale-gen

The language selector will detect and fix the unicode issue. The remaining
steps are more for installing other languages.

leewc.com
PGP Public Key: 0xFAE812E11D152AAD
http://pgp.mit.edu/pks/lookup?op=get&search=0xFAE812E11D152AAD

On Mon, Nov 21, 2016 at 6:00 AM, DennisL notifications@github.com wrote:

@fizxmike https://github.com/fizxmike,

Can confirm problem still exists in vanilla install using:

Are you getting error or warning messages and if so what are they?

I thought this had been addressed in the core#L119
https://github.com/dnschneid/crouton/blob/master/targets/core#L119
target.

-DennisL


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#534 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIInPuNks_6HcsL_yo5dGUgQCTqqRUegks5rAaPxgaJpZM4BUJKD
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants