Brodie Thiesfield <[EMAIL PROTECTED]> wrote: > > As far as I understand, sqlite changed sometime in the early 3.0 > versions such that char* strings (input and output) are always assumed > to be UTF-8. > [...] > > Yes. But this is a separate problem. Look at the code in os_win.c, e.g. > sqlite3WinFileExists. On Windows NT platforms, it will work fine only if > the caller supplies a ASCII or UTF-8 string (CP_ACP encoded strings will > fail). On Windows 9x platforms it will work fine only if the caller > supplies an ASCII or CP_ACP string (UTF-8 encoded strings will fail). > > Probably most users on Win9x are still passing in ANSI strings which is > why it is working. Change it to actually match the documentation and you > will probably see a few more failures. >
The intent of SQLite is that *all* input strings should be either UTF-8 or UTF-16. Usually strings should be UTF-8. Functions that accept UTF-16 are clearly labeled with a "16" at the end of their name. SQLite should never expect strings in any encoding other than UTF-8 or UTF-16. (Note that ASCII is a proper subset of UTF-8 so SQLite will also accept ASCII.) I do not know what CP_ACP is, but if it is not a subset of UTF-8 then SQLite should (if implemented as designed) malfunction if you give it a CP_ACP string that has a different representation than the equivalent UTF-8. If you find a case where SQLite is expecting some character encoding other than UTF-8 or UTF-16, then you have found a bug. Please create a ticket and suggest an appropriate patch. Note that there only two real platforms in the world: win32 and unix. In the unix world everything is UTF-8 and so it gives no problems in this area. Character encoding confusion seems to be confined to the win32 world. I do not use win32. And I have no desire to learn to use it. So I am depending on the win32 user community to find and fix problems with win32 character encodings. My intent is to let yall continue to debate a proper fix for porting the extension loading mechanism to wince and then once you reach consensus I will check in whatever that consensus happens to be. Thank you for your assistance. -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------