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.

classification
Title: PyUnicode_Decode with encoding utf8 crashes
Type: crash Stage: resolved
Components: Unicode Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Alexey Trenikhin, ezio.melotti, vstinner, xiang.zhang
Priority: normal Keywords:

Created on 2017-03-09 00:46 by Alexey Trenikhin, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test.c Alexey Trenikhin, 2017-03-09 00:46
Messages (2)
msg289261 - (view) Author: Alexey Trenikhin (Alexey Trenikhin) Date: 2017-03-09 00:46
#include <Python.h>
int main(){
        PyUnicode_Decode("abcdef", 4, "utf_8", "ignore");

  return 0;
}
crashes on linux and Windows (but works fine with encoding "utf-8" )
msg289278 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2017-03-09 07:23
You need to first call `Py_Initialize()` to initialize the Python interpreter. It is required.
History
Date User Action Args
2022-04-11 14:58:44adminsetgithub: 73950
2017-03-09 07:23:27xiang.zhangsetstatus: open -> closed

nosy: + xiang.zhang
messages: + msg289278

resolution: not a bug
stage: resolved
2017-03-09 00:46:30Alexey Trenikhincreate