New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use correct encoding for printing SyntaxErrors #40933
Comments
When SyntaxError occurs and the module contains This patch calls some memory-allocation APIs such as |
Logged In: YES I'm hoping that someone more familiar with unicode could |
Logged In: YES Please use the "replace" error handler when recoding the If you do get an error, it's likely going to be an unknown |
Logged In: YES Thanks for your comments. I'll post a revised patch and test |
Logged In: YES Sorry for my laziness. I revised a patch for current trunk.
|
Logged In: YES Note to self (or anyone interested): remember to look into this. |
I think Martin von Loewis knows more about this. |
Thanks for the patch. It wouldn't work as-is, because it broke PGEN. I |
We should make sure this is *not* merged into Py3k; there, things remain |
ishimoto: in dec_utf8, there is a PyErr_Print call. What is the purpose |
PyErr_Print() is called to report exception raised by codec. |
This comment is not very helpful; it describes what happens, but not |
Sorry for insufficient comment. When a codec raised an exception, I think the exception should be Should we silently clear the exception raised by codecs, or print a |
Can you create a test case that triggers that specific problem? Regards, |
Codecs would hardly ever raises exception here. I attached a script to print exception raised by codec. I wrote a "buggy" |
There are tons of situations where such an exception will be On 10/11/07, atsuo ishimoto <report@bugs.python.org> wrote:
|
That's fine with me. Please replace PyErr_Print() with PyErr_Clear(). |
Done. Committed revision 58471. |
In release25-maint, PyErr_Print() should be replaced with PyErr_Clear() |
Committed revision 58991. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: