5 Oct 2006 23:19
Operator recognition problems with Turkish locale
Stefaan A Eeckels <Stefaan.Eeckels <at> ecc.lu>
2006-10-05 21:19:02 GMT
2006-10-05 21:19:02 GMT
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.
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.
The Turkish locale is particular in that the lower case of 'I'
isn't 'i', but rather what we'd render as 'ý', 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 = 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; }
(Continue reading)
RSS Feed