I run a server at Scaleway which contains 7 containers (zfs+lxd), in the past I was able to insert special characters remotely (ø,æ,å) and those characters were able to get displayed correctly at web pages.
Now, the recent 2 months it stopped, special characters won’t display via terminal or at web pages, for example at a website instead of Bærum - Høvik it displays BÃærum - Høvik , I can type those at the host server but not at the lxds.
When I type ø it displays “(arg: 8)”, the other 2 å,æ won’t display nothing.
Make sure that you have any relevant language pack installed in the container.
If that’s the case, then the trick is usually to set the LANG and LANGUAGE environment variables in the container to match what’s expected for your particular locale/language.
I’m not sure why things would have suddenly changed though.
One thing that may catch some people off guard is that ssh will do a whole bunch of that for you, effectively reading your client’s locale and attempting to set it on the remote server.
“lxc exec” doesn’t do that, so you have to manually set those environment variables, either directly, or through .bashrc/.profile or you can set those keys for the container’s environment through LXD with:
lxc config set NAME environment.LANG en_US.UTF-8
lxc config set NAME environment.LANGUAGE en_US:en
Which will then have LXD automatically set those whenever you use “lxc exec” against that particular container.
blades@scw-82oof3e:~$ lxc config set meteo enviroment.LANG=en_US.UTF-8
error: Bad server config key: 'meteo'
blades@scw-82oof3e:~$ lxc config set meteo environment.LANGUAGE=en_US:en
error: Bad server config key: 'meteo
lxd --version 2.0.9
I don’t know what Iam doing wrong.