The fact that this happens in Turkish makes me think it is due (somewhere) to a common problem with Turkish localization: the "Turkish i problem" [1].
Basically, tolower() or toupper() may not work like someone is expecting, because they take locale into account.
[1] http://haacked.com/archive/2012/07/05/turkish-i-problem-and-why-you-should-care.aspx/
The fact that this happens in Turkish makes me think it is due (somewhere) to a common problem with Turkish localization: the "Turkish i problem" [1].
Basically, tolower() or toupper() may not work like someone is expecting, because they take locale into account.
[1] http:// haacked. com/archive/ 2012/07/ 05/turkish- i-problem- and-why- you-should- care.aspx/