On Sun, Jun 21, 2009 at 4:34 PM, Zbigniew Baniewski<z...@ispid.com.pl> wrote: > In the docs there is a remark: > > #v+ > upper(X) Return a copy of input string X converted to all upper-case > letters. The implementation of this function uses the C library routine > toupper() which means it may not work correctly on non-ASCII UTF-8 > strings. > #v- > > And yes - alas - upper/lower are unable to do it properly for characters > "outside ASCII". But I've found some more info: > > http://www.warpspeed.com.au/cgi-bin/inf2html.cmd?..%5Chtml%5Cbook%5CToolkt40%5CXPG4REF.INF+297 > > #v+ > Note: toupper and tolower can only be used for single-byte characters. > towupper and towlower should be used for case conversion of wide characters > that are equivalent to both single-byte and double-byte characters. > #v- > > It looks, like the problem could be easily solved just by replacing > "toupper/tolower" occurences with "towupper/towlower". Am I right? > If so - perhaps could be such change introduced in new version?
Unfortunately, no. A correct toupper/tolower would require locale support and passing in a string pointer, not a char. Even a wide character can't store all the information needed to make something upper/lower. -- Cory Nelson http://int64.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users