[pypy-issue] Issue #2233: PyPy 4.0.1 on FreeBSD 12 fails to get the correct locale (pypy/pypy)

HawkOwl issues-reply at bitbucket.org
Fri Feb 5 11:02:41 EST 2016


New issue 2233: PyPy 4.0.1 on FreeBSD 12 fails to get the correct locale
https://bitbucket.org/pypy/pypy/issues/2233/pypy-401-on-freebsd-12-fails-to-get-the

HawkOwl:

On FBSD12, PyPy does not seem to read the LANG variable, or even the LC_LANG variable (which isn't proper on FBSD, but anyway). This means there's never a locale, and it falls back to the default of None -- which causes everything Unicode to explode, as the default on CPython is "US-ASCII".

```
$ LANG=de_DE.UTF-8 /opt/pypy401/bin/pypy -c "import sys; print sys.getfilesystemencoding()"
```

And:

```
[oberstet at bvr-file1 ~]$ LC_LANG=C /usr/local/bin/pypy -c "import sys; print sys.getfilesystemencoding()"
None
[oberstet at bvr-file1 ~]$ export LC_LANG=C
[oberstet at bvr-file1 ~]$ /usr/local/bin/pypy -c "import sys; print sys.getfilesystemencoding()"
None
```

```
[oberstet at bvr-file1 ~]$ export LANG=de_DE.ISO8859-1
[oberstet at bvr-file1 ~]$ export LC_LANG=de_DE.ISO8859-1
[oberstet at bvr-file1 ~]$ /usr/local/bin/pypy -c "import sys; print sys.getfilesystemencoding()"
None
[oberstet at bvr-file1 ~]$ /opt/cpy2711/bin/python -c "import sys; print sys.getfilesystemencoding()"
ISO8859-1
```

...and...

```
[oberstet at bvr-file1 ~]$ /opt/pypy401/bin/pypy -c "import sys; print sys.getfilesystemencoding()"
None
[oberstet at bvr-file1 ~]$ /opt/cpy2711/bin/python -c "import sys; print sys.getfilesystemencoding()"
US-ASCII
```




More information about the pypy-issue mailing list