Message137885
| Author |
vstinner |
| Recipients |
amaury.forgeotdarc, vstinner |
| Date |
2011年06月07日.21:48:04 |
| SpamBayes Score |
0.01161298 |
| Marked as misclassified |
No |
| Message-id |
<1307483285.51.0.642940083136.issue12281@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Starting at Python 3.2, the MBCS codec uses MultiByteToWideChar() to decode bytes using flags=MB_ERR_INVALID_CHARS by default (strict error handler), flags=0 for the ignore error handler, and raise a ValueError for other error handlers.
The problem is that the meaning of flags=0 changes with the Windows version:
- ignore undecodable bytes until Windows XP
- *replace* undecodable bytes for Windows Vista and later
We should accept "replace" error handler with flags=0, at least on Windows Vista and later.
I don't know if we should only accept "ignore" on Windows <= XP and only "error" on Windows >= Vista, or if the difference should be documented. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年06月07日 21:48:05 | vstinner | set | recipients:
+ vstinner, amaury.forgeotdarc |
| 2011年06月07日 21:48:05 | vstinner | set | messageid: <1307483285.51.0.642940083136.issue12281@psf.upfronthosting.co.za> |
| 2011年06月07日 21:48:04 | vstinner | link | issue12281 messages |
| 2011年06月07日 21:48:04 | vstinner | create |
|