How can I type accented characters in bash shell within container?

Hi,

Running Docker on a Synology NAS. I SSH to the NAS and created a ubuntu:trusty and debian:jessie image. Then I used the command

docker exec -t -i test bash

From there, I am UNABLE to type any accented characters such as “é” or “à”. It is as if the shell refuses the letter. I tried to change the keyboard layout with:

loadkeys fr

or with

dpkg-reconfigure console-data

But in both case, after having selected a French keyboard, I am still unable to type accented characters. If I try the same with a busybox image, I am able to type those accented characters without any problem.

As soon as I exit the bash shell and return to the SSH, I am able to type any accented characters I want.

Can someone help me? I need to be able to type accented characters.

Thanks

2 Likes

I have exactly the same problem just that I need the ñ and latin chars. PLEASE someone answer.

Exec into the container passing the LANG environment variable set to C.UTF-8.

docker exec -it -e LANG=C.UTF-8 container_name bash

You can also do this from your Dockerfile.

I learned this from a Stack Overflow answer.