Operator recognition problems with Turkish locale
Stefaan A Eeckels <[email protected]> Thu, 5 Oct 2006 23:19:02 +0200
| Newsgroups | gmane.comp.db.mckoi |
|---|---|
| Organization | E.C.C. sa - Computer Consultants |
| Message-ID | <[email protected]> |
Hi list,
When using McKoi with a Turkish locale, the internal queries that
create the views don't work, and the database doesn't start.=20
The reason is that they are written in upper case, and McKoi's
Operator.get methods converts the keywords to lower case to recognise
them.=20
The Turkish locale is particular in that the lower case of 'I'
isn't 'i', but rather what we'd render as '=FD', and as a result the 'IN',
'IS', 'IS NOT', 'NOT IN', 'LIKE' and 'NOT LIKE' operators are not
recognised.
The fix is to convert to upper case instead
(/com/mckoi/database/Operator.java line 348):
// Operators that are words, convert to upper case...
// Upper case to avoid the Turkish locale problem [sae]
op =3D op.toUpperCase();
if (op.equals("IS")) { return is_op; }
else if (op.equals("IS NOT")) { return isn_op; }
else if (op.equals("LIKE")) { return like_op; }
else if (op.equals("NOT LIKE")) { return nlike_op; }
else if (op.equals("REGEX")) { return regex_op; }
else if (op.equals("IN")) { return in_op; }
else if (op.equals("NOT IN")) { return nin_op; }
else if (op.equals("NOT")) { return not_op; }
else if (op.equals("AND")) { return and_op; }
else if (op.equals("OR")) { return or_op; }
Take care,
--=20
Stefaan
--=20
As complexity rises, precise statements lose meaning,
and meaningful statements lose precision. -- Lotfi Zadeh=20
---------------------------------------------------------------
Mckoi SQL Database mailing list http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]