My example worked only with then wrong encoded strings. The string was already in utf8 encoded. But at some place the string has been encoded to latin1. This happens with Python 2 very often, because there is no difference between str and bytes. It is possible with Python 2 to encode a string twice, which ends in a broken text. Often encoding/decoding was used in Python 2 incorrectly.
Scenario 1:
The charset of the database has been changed afterwards without doing a conversion of the old data. Latin1 is a relict from ancient times, but it's still used.
Scenario 2:
The program, which filled the database, did the encoding wrong.
Scenario 1:
The charset of the database has been changed afterwards without doing a conversion of the old data. Latin1 is a relict from ancient times, but it's still used.
Scenario 2:
The program, which filled the database, did the encoding wrong.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!