Steven D'Aprano <steve+pyt...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue44898>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to