Forgot to add: My headache was essentially UTF-8 encoding, but the same would happen with others, though invalid chars do not really exist in UTF7 or ANSI, but in the higher level encodings they are plentiful.

On 2014/02/17 19:35, RSmith wrote:

Yeah, I too have had real problems with this - It isn't limited to Latin1 either - but in my case I found one invalid character that doesn't conform to the specified encoding would drop the entire string in any encoding. This was hard to trace because 99 conversions would succeed with all kinds of weird and wonderful encoded characters, and then one suddenly returns an empty string. I eventually traced this down to the OS's C API for encoding conversions which seems to simply drop the entire value and not even cause an error - just returns empty string. Peculiar behaviour if you ask me (though that is probably meant to prompt an error from the high-level code's design, but nobody told me...). This seems the case for both Windows and OSX, I can't speak for Linux, Android, etc. maybe someone else knows?

Anyway, adding a conversion check is the key, but the point is moot if you rely on PHP or such to do the conversions for you. Scripts don't have GUIs... they cant really do much about it. Maybe an error log somewhere contains some info?

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to