On 12 Aralık 2010 Pazar 22:56:29 Bram Moolenaar wrote: > Fatih Arslan wrote: > > On Sat, Dec 11, 2010 at 01:51:52PM +0100, Bram Moolenaar wrote: > > >Most likely the C function tolower() doesn't work on the 'I'. Try this: > > > :lang ctype C > > > > That's works fine, thanks. But is there any way to fix it without > > setting the ctype to C ? I mean without changing the locale ? > > > > I guess to solve it we should fix the tolower() function. Am I right ? > > It's difficult to solve this without slowing down for everybody not > using a Turkish locale. > > Is there a problem with setting ctype to C?
I'm flaming this thread up, sorry :) Yep, setting the ctype to C is not acceptable for Turkish language since we have an exception in our alphabet that the uppercase of "i" is not "I", it's "İ". And the lowercase of "I" is not "i", it's "ı". If any programmer uses glibc provided tolower/toupper/strcmp/strncmp, it will fail to convert, for example "join", "bits" etc. "join" (toupper) "JOİN" "bits" (toupper") "BİTS" "JOIN" (tolower) "joın" "BITS" (tolower) "bıts" There are locale awareless string functions in glib mostly for this kind of situations (g_ascii_tolower...). Maybe we should use vim_tolower/vim_toupper functions for reserved word conversions just to convert in C locale. -- H. İbrahim Güngör
signature.asc
Description: This is a digitally signed message part.
