*** ./src/backend/parser/scan.l.orig 2004-02-02 12:25:04.000000000 +0200 --- ./src/backend/parser/scan.l 2004-02-03 14:10:55.000000000 +0200 *************** *** 549,560 **** * Note: here we use a locale-dependent case conversion, * which seems appropriate under standard SQL rules, whereas * the keyword comparison was NOT locale-dependent. */ ident = pstrdup(yytext); for (i = 0; ident[i]; i++) { if (isupper((unsigned char) ident[i])) ! ident[i] = tolower((unsigned char) ident[i]); } if (i >= NAMEDATALEN) { --- 549,573 ---- * Note: here we use a locale-dependent case conversion, * which seems appropriate under standard SQL rules, whereas * the keyword comparison was NOT locale-dependent. + * + * Note: locale-dependent causes incorrect downcasting + * of capital 'I' if used with tr_TR locale. Instead + * of being converting to 'i' it gets converted to '\xfd' + * or in Unicode which, according to + * /usr/share/i18n/charmaps/ISO-8859-9.gz + * stands for "LATIN SMALL LETTER DOTLESS I" . + * To prevent this, a special case is introduced. */ ident = pstrdup(yytext); for (i = 0; ident[i]; i++) { if (isupper((unsigned char) ident[i])) ! { ! if (ident[i] == 'I') ! ident[i] = 'i'; ! else ! ident[i] = tolower((unsigned char) ident[i]); ! } } if (i >= NAMEDATALEN) {