-C Use\sGetProcAddressA()\son\swince.\s\sTicket\s#2123\s(CVS\s3543)
-D 2006-12-21T02:21:57
+C More\sfixes\sto\sthe\smicrosoft\scode-page\snightmare...\s(CVS\s3544)
+D 2006-12-21T03:20:41
F Makefile.in 8e14898d41a53033ecb687d93c9cd5d109fb9ae3
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
F src/os_unix.c d4bc8cbe1c0dc330bd55bf7821db5b7dbfbf183e
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
-F src/os_win.c d7cf0fc2acd9d2a519a9442f78b4bdbf30e730d6
+F src/os_win.c ca46001d4ec446885f72d3b7fd6a657136156228
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
F src/pager.c 814268d5bbd69f30069867142f1d460b8b7ab778
F src/pager.h 2e6d42f4ae004ae748a037b8468112b851c447a7
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 6d2ff0962dff0477fe2af0323032dc16337f42ab
-R 1a4c9add7b3dd8462c8e8800ce5e3721
+P e3dddd1cef5877c009852fd7f484973843e26e00
+R 73c89ed5916e57284a7ee348ebe00fd3
U drh
-Z 485f836110e73c29878298d90fc161b1
+Z da8e9bd7450544645912de3f756444c4
#endif /* OS_WINCE */
/*
-** Convert a UTF-8 string to UTF-32. Space to hold the returned string
-** is obtained from sqliteMalloc.
+** Convert a UTF-8 string to microsoft unicode (UTF-16?).
+**
+** Space to hold the returned string is obtained from sqliteMalloc.
*/
static WCHAR *utf8ToUnicode(const char *zFilename){
int nChar;
}
/*
-** Convert UTF-32 to UTF-8. Space to hold the returned string is
+** Convert microsoft unicode to UTF-8. Space to hold the returned string is
** obtained from sqliteMalloc().
*/
static char *unicodeToUtf8(const WCHAR *zWideFilename){
}
/*
-** Convert a multibyte character string to UTF-32, based on the current
-** Ansi codepage (CP_ACP). Space to hold the returned string is obtained
+** Convert an ansi string to microsoft unicode, based on the
+** current codepage settings for file apis.
+**
+** Space to hold the returned string is obtained
** from sqliteMalloc.
*/
static WCHAR *mbcsToUnicode(const char *zFilename){
int nByte;
WCHAR *zMbcsFilename;
+ int codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
- nByte = MultiByteToWideChar(CP_ACP, 0, zFilename, -1, NULL, 0)*sizeof(WCHAR);
+ nByte = MultiByteToWideChar(codepage, 0, zFilename, -1, NULL,0)*sizeof(WCHAR);
zMbcsFilename = sqliteMalloc( nByte*sizeof(zMbcsFilename[0]) );
if( zMbcsFilename==0 ){
return 0;
}
- nByte = MultiByteToWideChar(CP_ACP, 0, zFilename, -1, zMbcsFilename, nByte);
+ nByte = MultiByteToWideChar(codepage, 0, zFilename, -1, zMbcsFilename, nByte);
if( nByte==0 ){
sqliteFree(zMbcsFilename);
zMbcsFilename = 0;
}
/*
-** Convert UTF-32 to multibyte character string, based on the user's Ansi
-** codepage (CP_ACP). Space to hold the returned string is obtained from
+** Convert microsoft unicode to multibyte character string, based on the
+** user's Ansi codepage.
+**
+** Space to hold the returned string is obtained from
** sqliteMalloc().
*/
static char *unicodeToMbcs(const WCHAR *zWideFilename){
int nByte;
char *zFilename;
+ int codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
- nByte = WideCharToMultiByte(CP_ACP, 0, zWideFilename, -1, 0, 0, 0, 0);
+ nByte = WideCharToMultiByte(codepage, 0, zWideFilename, -1, 0, 0, 0, 0);
zFilename = sqliteMalloc( nByte );
if( zFilename==0 ){
return 0;
}
- nByte = WideCharToMultiByte(CP_ACP, 0, zWideFilename, -1, zFilename, nByte,
+ nByte = WideCharToMultiByte(codepage, 0, zWideFilename, -1, zFilename, nByte,
0, 0);
if( nByte == 0 ){
sqliteFree(zFilename);
return 0;
}
if( isNT() ){
- h = LoadLibraryW(zConverted);
+ h = LoadLibraryW((WCHAR*)zConverted);
}else{
#if OS_WINCE
return 0;
#else
- h = LoadLibraryA(zConverted);
+ h = LoadLibraryA((char*)zConverted);
#endif
}
sqliteFree(zConverted);