[issue1193] os.system() encoding bug on Windows
Christian Heimes added the comment: Amaury is planing to remove Win95 code and use the wide api everywhere. It should fix the bug. -- assignee: - amaury.forgeotdarc components: +Interpreter Core, Windows -Library (Lib) nosy: +amaury.forgeotdarc priority: high - normal resolution: accepted - __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1193 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1193] os.system() encoding bug on Windows
Amaury Forgeot d'Arc added the comment: Note that the final .encode(cp936) is now invalid: os.system accepts unicode strings, not bytes: os.system((echo + sys.stdin.readline().rstrip(\n))) Corrected as r59065. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1193 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1193] os.system() encoding bug on Windows
Christian Heimes added the comment: Python 3.0 has many more problems at its boundaries to the system on Windows. Large parts of the API that deals with Windows system calls have to be rewritten in order to use the wide char API. -- keywords: +py3k nosy: +tiran priority: normal - high resolution: - accepted __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1193 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1193] os.system() encoding bug on Windows
Fan Decheng added the comment: Steps to reproduce: 1. Use a Windows, with system default encoding to cp936 (Chinese PRC, or Simplified Chinese) in Regional Options. 2. Open Python 3.0 (command line). 3. Type: import os import sys os.system((echo + sys.stdin.readline().rstrip(\n)).encode(cp936)) (in stdin type:) 我 Result: The output from echo would be utf-8 mistakenly used as cp936: 鎴? Expected result: The echo command outputs 我. Comments: I guess os.system can recoding the string before sending the string out. This may be done in the C part of Python. BTW, The os.popen() function is correct. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1193 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1193] os.system() encoding bug on Windows
Fan Decheng added the comment: A note about reproducing: since Windows 2000 all language packs can be installed easily using the Regional Options in the Control Panel. Even on an English version of Windows, character set mappings and fonts of other languages can be installed. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1193 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1193] os.system() encoding bug on Windows
Changes by Sean Reifschneider: -- priority: - normal severity: major - normal __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1193 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1193] os.system() encoding bug on Windows
New submission from Fan Decheng: Python 3.0 uses utf-8 encoding, but os.system() when running on Windows uses the system default encoding, which may be cp936 or mbcs. They are incompatible. -- components: Library (Lib) messages: 56101 nosy: r_mosaic severity: major status: open title: os.system() encoding bug on Windows type: behavior versions: Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1193 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com