You are not logged in.
Pages: 1
I am working on a project and I'd like to use sqlite3 to store permanent data.
The C API comes in two flavours: strings encoded in utf8 and strings encoded in utf16.
So my questions are: how can I know how the non ASCII character are sent to my program?
I can be sure that if the current locale LC_CTYPE is named .*\.utf8 then the strings will be utf8 encoded?
And if the current locale it is not .*\.utf8, how can I know the locales installed and so set it?
I read something about in the internet, but I could find nothing about the point 2 and 3... Thanks for any insight.
etb
Offline
Well -- the answers depend on facts you didn't provide.
If your locale is *.UTF-8, then all text from a terminal will be in utf-8, but you can still have a file in, say, iso-8859-1. When you read this file, it won't get converted to utf8. You'll have to manage conversions yourself.
Offline
Oh yes, sorry. I meant text from the terminal. Like arguments.
Offline
Pages: 1