Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

Need to set the locale. #45

Open
docbill opened this issue Aug 15, 2014 · 5 comments
Open

Need to set the locale. #45

docbill opened this issue Aug 15, 2014 · 5 comments

Comments

@docbill
Copy link

docbill commented Aug 15, 2014

I just learned the hardware, if you use this Dockerfile postgres will use the POSIX locale. That means all special characters will be mangled... I have added the line:

ENV LANG en_US.UTF-8

into my Dockerfile, but it will take a while to test if that really fixes the problem with non-English characters, long dashes, etc, as it take about 24 hours for my process to build a working database.

@scollier
Copy link
Member

@docbill Thanks for bringing it to my attention. I wasn't aware of that. Please do test and let's get that included if it indeed fixes the issue.

@docbill
Copy link
Author

docbill commented Aug 27, 2014

Yes. It turns out this is really needed for all docker images. At first I tried just the postgresql docker image, but I found my processes connecting to the database from other containers would not use the same character encoding and have problems. Now all my docker images and all UTF8 characters are properly preserved.

I'm just trying to figure out how to do a fork, as I've done other changes you might want to merge.

@docbill docbill closed this as completed Aug 27, 2014
@docbill docbill reopened this Aug 27, 2014
@sourcejedi
Copy link
Contributor

This should be fixed by now, right? I think the Fedora base image uses en_US.UTF-8.

https://git.fedorahosted.org/cgit/spin-kickstarts.git/tree/fedora-docker-base.ks?h=0.23.6&id=d0b28ea2c374542fdb5257b007c46a0e930dd8b5

@sourcejedi
Copy link
Contributor

Sorry, I guess that's irrelevant for an app container, because there's no boot process (systemd etc) to set LANG from /etc/locale.conf.

@mattdm
Copy link
Member

mattdm commented Nov 27, 2015

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

No branches or pull requests

4 participants