消息 [107466]
My tests with 7-zip and WinRAR conviced me that it's not a good idea to use utf-8 *by default* on Windows. But since mbcs doesn't support surrogateescape error handler, we should restore the previous behaviour just for this encoding.
tarfile_mbcs_errors.patch creates a function choose_errors() which determine the best error handler depending on the encoding and the mode (read or write):
- "strict" to write with mbcs
- "replace" to read with mbcs
- "surrogateescape" otherwise
Please, review my changes on the documentation :-)
On Windows, patched tarfile works exactly as Python 3.1. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2010-06-10 17:19:04 | vstinner | 修改 | recipients:
+ vstinner, lemburg, loewis, lars.gustaebel |
| 2010-06-10 17:19:04 | vstinner | 修改 | messageid: <1276190344.13.0.674254471941.issue8784@psf.upfronthosting.co.za> |
| 2010-06-10 17:19:02 | vstinner | 链接 | issue8784 messages |
| 2010-06-10 17:19:01 | vstinner | 创建 | |
|