Description of problem:
When using the Vagrant base-cloud image, all non-en (all but C, en_US, C.utf8 and en_US.utf8) locales are gone. If you ssh in and your locale is non-en, the system will fall back to C. That is an ASCII locale an that causes trouble.
Version-Release number of selected component (if applicable):
Fedora 25, 26 and probably all others.
Steps to Reproduce:
1. vagrant init fedora/25-cloud-base
2. vagrant up
3. LANG=cs_CZ.utf8 vagrant ssh
4. $ dnf
5. $ echo ččč > file
6. $ python3
Python 3.5.2 (default, Sep 14 2016, 11:28:32)
[GCC 6.2.1 20160901 (Red Hat 6.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> with open('file') as f:
Failed to set locale, defaulting to C
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/usr/lib64/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 0: ordinal not in range(128)
Deal with my locale or set C.utf8
We are workarounding this problem in python3. But I still except that a modern system would work with utf8 buy default if it cannot find my locale.
In this scenario, I suppose the Vagrant image should set the locale back to en_US.utf8 or C.utf8 when it cannot find the locale of the SSH client.
This is by design in the cloud base image https://pagure.io/fedora-kickstarts/blob/master/f/fedora-cloud-base.ks#_153 https://pagure.io/fedora-kickstarts/blob/master/f/fedora-cloud-base.ks#_53 I suspect that the owners will not want to change the behaviour
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.
While python now has mechanism in place to deal with ASCII locales, I still see this as a problem.
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.
There is a proposed Fedora change that fixes this: https://fedoraproject.org/wiki/Changes/Reset-locale-if-not-available
This bug appears to have been reported against 'rawhide' during the Fedora 30 development cycle.
Changing version to '30.