STINNER Victor added the comment: Please use ascii() instead of repr() in your test to identify who replaces characters with question marks. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue21927> _______________________________________