The problem comes out when you deal with string comparison in a language sensitive context. If you just convert to upper case and then compare, without ever considering a locale, you cannot know we're dealing with turkish. A plain conversion to lower and to upper should work correctly, as the dotted upper case I with a dot, convers to a simple i.

This should be tackled in a different lib. I will be proposing a libi18n that should have things like case insensitive comparison in a locale context.

> On 1 mar 2014, at 21:05, Val Markovic <notifications@github.com> wrote:
> 
> In src/libstd/char.rs:
> 
> > @@ -486,6 +518,39 @@ fn test_to_digit() {
> >  }
> >  
> >  #[test]
> > +fn test_to_lowercase() {
> > +    assert_eq!('A'.to_lowercase(), 'a');
> In important test case to have would be the infamous Turkish i.
> 
> It's an issue in many languages/frameworks:
> http://blogs.msdn.com/b/deeptanshuv/archive/2004/09/04/225720.aspx
> http://haacked.com/archive/2012/07/05/turkish-i-problem-and-why-you-should-care.aspx/
> https://groups.google.com/d/topic/golang-nuts/w8eZxT3dA48/discussion
> http://stackoverflow.com/questions/16830570/qt-turkish-characters-case-conversion
> http://wiki.tcl.tk/748
> epeli/underscore.string#252
> nicolas-grekas/Patchwork-UTF8#2
> http://lotusnotus.com/lotusnotus_en.nsf/dx/dotless-i-tolowercase-and-touppercase-functions-use-responsibly.htm
> 
> I could add more, but basically every language/framework gets this wrong and it has cost people's lives.
> 
> —
> Reply to this email directly or view it on GitHub.