Issue 29764: PyUnicode_Decode with encoding utf8 crashes (original) (raw)

Issue29764

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:44 admin set github: 73950
2017-03-09 07:23:27 xiang.zhang set status: open -> closednosy: + xiang.zhangmessages: + resolution: not a bugstage: resolved
2017-03-09 00:46:30 Alexey Trenikhin create