The 'Latin capital letter I with dot above', İ (Unicode 0130), strikes again! This innocent looking Turkish character seems to be reliable when it comes to breaking software that should be able to handle UTF8. (See also this post for a Java example.)
This time it breaks the Firebird database (in my case, v2.1.1 on a 64-bit Debian system). Downcasing some random characters in a database configured to handle UTF8 works fine:SELECT LOWER('AӴЁΪΣƓ') FROM RDB$DATABASE
returns the expected string, aӵёϊσɠ
.
However, when you throw in the trouble-making İ
, everything blows up:
SELECT LOWER('AӴЁΪΣƓİ') FROM RDB$DATABASE
*** IBPP::SQLException ***
Context: Statement::Fetch
Message: isc_dsql_fetch failed.
SQL Message : -104
Invalid token
Engine Code : 335544849
Engine Message :
Malformed string
Slightly different input, generates a different error message:
SELECT LOWER('İA') FROM RDB$DATABASE
*** IBPP::SQLException ***
Context: Statement::Fetch
Message: isc_dsql_fetch failed.
SQL Message : -802
Arithmetic overflow or division by zero has occurred.
Engine Code : 335544321
Engine Message :
arithmetic exception, numeric overflow, or string truncation
There is an item on the Firebird user list, but without any answers so far.
Update: As mariuz points out in a comment below, this defect now seems to be fixed in an upcoming version. See this bug tracker item.