Re: [sqlite] Compile sqlite with only ANSI support (no Unicode)
Singaravelu, Rajaram schrieb: > Hi, > > [...] > > In short, can anyone tell me if I can compile sqlite3 with only ANSI > support so that it works like the ANSI version of fopen(). If I understand you correctly you just care about the filename when you talk about UTF8?! In this case everything should be very easy. You can find the whole win-specific stuff in os_win.c. Concerning fopen: This call is not used, instead the Windows API function CreateFile is used (see function winOpen!). As I can see in the source, the W-prefixed call is used which is the Unicode-aware function. You could either try replacing CreateFileW with CreateFileA or convert the filename with something like MultiByteToWideChar. > Thanks for your help. > > -Rajaram Regards, Luke ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Compile sqlite with only ANSI support (no Unicode)
Hi, I am using sqlite 3.6.16 in my application to create a database. I am aware that sqlite supports Unicode and it expects the database file path to be either UTF-8 or UTF-16 encoded. But my application supports only ANSI (ASCII + rest of the 128 characters in the machine's character map) and I have no immediate plans to make it Unicode compliant. The problem is that, the application is being used in few non-english machines where the path happens to have accented (French/Spanish) characters. Since I do not convert the ANSI string to UTF-8 before calling sqlite3_open(), the database creation fails. A normal fopen() (ANSI version) succeeds for the same path because the non-english accented character falls within the 256 characters defined in the machine's character map. I wish sqlite3_open() also function the same way. There are several instances in my code where I call sqlite3_open(). Instead of converting the path to UTF-8 encoding in all those instances, I was wondering if I can somehow change sqlite to expect the file path to be in ANSI instead of UTF-8. In short, can anyone tell me if I can compile sqlite3 with only ANSI support so that it works like the ANSI version of fopen(). Thanks for your help. -Rajaram ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users