[issue35071] Canot send real string from c api to module (corrupted string)

2018-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyUnicode_FromString() doesn't interpret %. Did you use PyUnicode_FromFormat()? -- nosy: +serhiy.storchaka ___ Python tracker ___ _

[issue35071] Canot send real string from c api to module (corrupted string)

2018-10-25 Thread Yhojann Aguilera
New submission from Yhojann Aguilera : The functios like as PyUnicode_FromString use a printf format in char array argument. Example: PyUnicode_FromString("a%22b"); in module interprete the %22 as 22 blank spaces. A double quote in module add a backslash. Poc: Y try send a string from c++ to