[issue44898] Path.read_bytes() failed when path contains chinese character
Steven D'Aprano
report at bugs.python.org
Thu Aug 12 06:26:49 EDT 2021
Steven D'Aprano <steve+python at pearwood.info> added the comment:
How did you enter the Chinese characters?
It works for me:
>>> filename = 'Beijing 北京市'
>>> with open(filename, 'w') as f:
... f.write('data')
...
4
>>> from pathlib import Path
>>> p = Path(filename)
>>> p.read_bytes()
b'data'
Please provide a *minimal reproducible example*
https://stackoverflow.com/help/minimal-reproducible-example
http://www.sscce.org/
----------
nosy: +steven.daprano
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44898>
_______________________________________
More information about the Python-bugs-list
mailing list