SQLite Forum

TEXT values can contain arbitrary binary data
Login
This is a good example of the GIGO (Garbage In, Garbage Out) rule. SQLite is very faithfully reproducing the exact garbage string you gave it.

SQLite expects text values to be encoded in the database encoding. Period. It does not check for valid encoding. It is your responsibility to provide valid data, especially if you expect to convert between encodings later using SQLite.