Skip to content

Psql -> cyrillic characters, CTRL+R, ... #310

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

Closed
ogolovanov opened this issue Jul 8, 2017 · 4 comments
Closed

Psql -> cyrillic characters, CTRL+R, ... #310

ogolovanov opened this issue Jul 8, 2017 · 4 comments

Comments

@ogolovanov
Copy link

Hello.

If i run psql command via
docker run --rm -ti postgres:9.6 psql '-hxxx.xxx.xxx.xxx' 'database' 'login'
i can not enter russian characters and i can not search through history via CTRL+R combination.

But if i build following image and run the same command - i will be able to enter russian characters and use CTRL+R.

I really can't get how can that be possible.
Why your image does not allow that?
Thanks.

FROM debian:jessie
RUN apt-get update && apt-get install -y locales locales-all postgresql-client
ENV LANG en_US.UTF-8

@tianon
Copy link
Member

tianon commented Jul 10, 2017

We set LANG appropriately by default (

# make the "en_US.UTF-8" locale so postgres will be utf-8 enabled by default
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8
), so I'm not sure why this occurs with our image and not the simple version you've created. 😕

@ogolovanov
Copy link
Author

Hello.

Problem is here:
"ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH"

So, psql command from /usr/lib/postgresql/9.6/bin/psql used instead of /usr/bin/psql.
The second one works correctly, the first - not.

@MrYoda
Copy link

MrYoda commented Oct 6, 2017

Have the same issue with command (on running container based on postgres:9.5-alpine):
docker exec -it --user postgres postgres-test psql
I can not type or paste any non-ascii symbol. How can I fix it?

@tianon
Copy link
Member

tianon commented Oct 11, 2017

Sorry, I think this got lost at some point. 😞

I've opened #355, which should hopefully fix this. 👍

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

3 participants