Message292630
IMHO this doesn't look like an error in xml library. With a little tweak in of your problem: adding encoding declaration, removing not needed imports, replace open with codecs.open(encoding='utf8') in create_report, the C problem works fine for me:
[tmp]$ cat essai_rapport_test_30-04-2017-22-22_你好.xml
<?xml version="1.0" ?>
<rapport_test date="2017-04-30" langue="你好" nb_correcte="你好" nb_incorrecte="abc" time="22:22:46"/>
xml_file.write(doc.toprettyxml()) fails for me since ascii codecs cannot encode the result of doc.toprettyxml, a unicode. And I would suggest you adding failure checks to your C program. Almost every step could fail and then result in a segfault. |
|
Date |
User |
Action |
Args |
2017-04-30 14:28:51 | xiang.zhang | set | recipients:
+ xiang.zhang, lemburg, vstinner, benjamin.peterson, ezio.melotti, serhiy.storchaka, aimad |
2017-04-30 14:28:51 | xiang.zhang | set | messageid: <1493562531.66.0.94494842519.issue30195@psf.upfronthosting.co.za> |
2017-04-30 14:28:51 | xiang.zhang | link | issue30195 messages |
2017-04-30 14:28:51 | xiang.zhang | create | |
|