[pypy-issue] Issue #2161: PyPy3 strftime does not accept unicode characters (pypy/pypy)
ZyX_I
issues-reply at bitbucket.org
Mon Oct 5 23:57:32 CEST 2015
New issue 2161: PyPy3 strftime does not accept unicode characters
https://bitbucket.org/pypy/pypy/issues/2161/pypy3-strftime-does-not-accept-unicode
ZyX_I:
Consider the following code:
% pypy3 -c 'from datetime import datetime as dt; print(repr(dt.now().strftime(''\u231a'')))' | hexdump -C
it outputs
00000000 27 ef bf bd ef bf bd ef bf bd 27 0a |'.........'.|
0000000c
: basically a single quote, three U+FFFD REPLACEMENT CHARACTER characters, a single quote and newline. If you replace `pypy3` with `python3.4` you will see
00000000 27 e2 8c 9a 27 0a |'...'.|
00000006
which is what was expected: same surrounding and a single U+231A WATCH character. This happens with PyPy3-2.4.0, Gentoo amd64 linux with `USE='bzip2 gdbm jit ncurses -sqlite -tk'` (each USE flag listed, except jit produces either `--withmod-{use}` (`{use}`) or `--withoutmod-{use}` (`-{use}`) arguments, jit adds `--jit-backend=auto` argument).
More information about the pypy-issue
mailing list