The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,380 other followers

Field “id” not found, the The Turkish-İ/I/i/ı and case conversion and case folding – Update on the dasBlog Turkish-I bug and a reminder to me on Globalization – Scott Hanselman

Posted by jpluimers on 2018/06/05

Reminder to self: in Turkey, they have more than just the lowercase i and uppercase I. In fact these are the i characters you can get:

Note there are more non-US latin characters in Turkey, see the links below for some lists.

The Turkish case conversion is inside the same group of dotted. The English case conversion is from dotted lowercase i to dotless uppercase I as shown in [WayBackInternationalizing Turkish: Dotted and Dotless Turkish Letter “I”:

English vs. Turkish Case Mappings
Language Letter Lowercase
Map
Uppercase
Map
English i i I
Turkish dotted i i İ
Turkish dotless ı ı I

In general, this problem is called [WayBack] Case Folding and many environments do not have good and ready to use solutions for this.

In my case, I was getting Field "id" not found messages for all tables that had an ID field. The reason was that somewhere in the path from my code to the database, either a comparison or case conversion wasn’t taking into account the above mappings.

Though the underlying database indicates I shouldn’t in [WayBackDo I have to use UPPERCASE identifiers?, it appears that something in the path from my code via IBX to the Firebird 2.5 database has issues on Turkish machines. The good thing: Database WorkBench 5.x doesn’t have that issue for a regular query.

Usually databases are only cases sensitive with quoted identifiers, but not all are: [WayBackLorenzo Alberton – Articles – Database identifiers, quoting and case sensitivity

Later I managed to get a stack trace on the Turkish system:

IBX.IBUtils.FormatIdentifierValue(1,'id')
IBX.IBSQL.TIBXSQLDA.GetSQLVARByName('id')
IBX.IBSQL.TIBXSQLDA.ByName('id')
IBX.IBSQL.TIBSQL.ParamByName('id')
IBX.IBCustomDataSet.TIBDataSet.ParamByName('id')

 

References:

note so self: some DAC layers hard-code quoted case sensitive identifier names: [WayBackado.net – Firebird and Entity Framework case sensitve table/column names – Stack Overflow

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: