Culture comparison in FBDataReader ---------------------------------- Key: DNET-406 URL: http://tracker.firebirdsql.org/browse/DNET-406 Project: .NET Data provider Issue Type: Bug Components: ADO.NET Provider Affects Versions: 2.7 Environment: Windows with Turkish Locale (tr-TR) Reporter: Robert Kindl Assignee: Jiri Cincura
when I use FbDataReader to load some data from database on system with tr-TR locale it's not possible to use columns containing with character "i". It's simply because Char.ToUpper('i') does not returns I but "I with dot". So in this case "caseinsensitive" comparison is not enough. Example string description = aDataReader["ProductDescription"]; Workaround - use upper characters for I eg. - but it's awfull and hard to test string description = aDataReader["ProductDescrIptIon"]; I tried to do some quick&dirty fix in FBDataReader.cs in method GetOrdinal. I simple replace original code if (!columnsIndexes.TryGetValue(name.ToUpper(), out index)) throw new IndexOutOfRangeException("Could not find specified column in results."); with if (!columnsIndexes.TryGetValue(name.ToUpper(CultureInfo.InvariantCulture), out index)) throw new IndexOutOfRangeException("Could not find specified column in results."); but in fact, I think that best fix should be by using something like this: String.Equals("i", "I", StringComparison.InvariantCultureIgnoreCase) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider