This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Arfrever, amaury.forgeotdarc, ezio.melotti, lemburg, loewis, vstinner
Date 2010-03-05.12:56:15
SpamBayes Score 9.554294e-08
Marked as misclassified No
Message-id <>
Patch for pythonrun.c:
 - catch _PyUnicode_AsString() error in get_codeset(): very unlikely, codeset is the result of nl_langinfo() and is ASCII only
 - catch _PyUnicode_AsString(sys.stdin.encoding) error in PyRun_InteractiveOneFlags()
 - use _PyUnicode_AsStringOrDefault() for ps1 and ps2: use ps1="" and/or ps2="" on unicode error. I don't know if it's the best option. Display the error is maybe a better idea.

It's possible to raise to test the error on sys.stdin.encoding by adding the following lines to

class Stdin: pass
sys.stdin = Stdin()
sys.stdin = "\xdc80"

See also #8070: PyRun_InteractiveLoopFlags() doesn't handle errors :-/
Date User Action Args
2010-03-05 12:56:17vstinnersetrecipients: + vstinner, lemburg, loewis, amaury.forgeotdarc, ezio.melotti, Arfrever
2010-03-05 12:56:17vstinnersetmessageid: <>
2010-03-05 12:56:16vstinnerlinkissue6697 messages
2010-03-05 12:56:15vstinnercreate