UTF-8 stream) - this seems logical, or?
Not at all. UTF-8 was made to encode 8-bit characters as well as 16-bit.
There is no way to distinguish an 8-bit wide string and an UTF-8-encoded string.
UTF-8 was *not* made for encoding 7-bit wide string, and subsequently doesn't encode 7-bit-wide strings.
Note that the following must *always* be true:
| str == utf8_to_string(string_to_utf8(str));
or to generalize:
| str == utf8_to_string(utf8_to_string(string_to_utf8(string_to_utf8(str))));
NB: This all is not only a theory - I've a real application which cannot use SQLite "as is", i.e. with this conversion. I can use MySql or Informix without any problems, though - just wanted to get rid of it...
If Sqlite doesn't work, fix Sqlite or the glue to it.