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

chinese support settings,zh_CN.UTF-8 #359

Closed
KeithTt opened this issue Jan 5, 2017 · 5 comments
Closed

chinese support settings,zh_CN.UTF-8 #359

KeithTt opened this issue Jan 5, 2017 · 5 comments

Comments

@KeithTt
Copy link

KeithTt commented Jan 5, 2017

I used the 5.6php image from Debian OS
https://github.com/docker-library/docs/tree/master/php

i have set chinese support, but still Messy Display when i edit a file with vim,
also i have set my xshell terminal...i followed these two guides
http://www.cnblogs.com/sslizy/p/4057397.html
http://blog.wifizoo.net/?post=82

cat /etc/debian_version

8.6

php -v

PHP Warning: Module 'redis' already loaded in Unknown on line 0
PHP 5.6.27 (cli) (built: Oct 21 2016 23:13:17)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

apt-get install locales

dpkp-reconfigure locales

locale -a

C
C.UTF-8
POSIX
en_US.utf8
zh_CN
zh_CN.gb2312
zh_CN.gbk
zh_CN.utf8

@KeithTt
Copy link
Author

KeithTt commented Jan 5, 2017

@yosifkit

@tianon
Copy link
Member

tianon commented Jan 6, 2017

Did you set LANG in your image after generating the correct locales? (ie, -e LANG=zh_CN.utf8 or ENV LANG zh_CN.utf8)

@abcfy2
Copy link

abcfy2 commented Jan 11, 2017

Because base image default locale is C, which does not support UTF-8 characters.

If you want to display Chinese characters, just set an environment variable LC_ALL to C.UTF-8. E.g:

docker run --rm -e LC_ALL=C.UTF-8 <your_image_name>

Thus you can see any UTF-8 characters.

@KeithTt
Copy link
Author

KeithTt commented Jan 13, 2017

@abcfy2 Amazing, it worked, thanx a lot.

@KeithTt KeithTt closed this as completed Jan 13, 2017
@huan
Copy link

huan commented May 26, 2017

@abcfy2 You are my hero!

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

No branches or pull requests

4 participants