[SERVER-9367] toLowerCase() function does not work for Turkish char "İ" Created: 17/Apr/13  Updated: 31/Jul/15  Resolved: 03/Feb/15

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.4.1
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: telman shahbazov Assignee: Matt Kangas
Resolution: Duplicate Votes: 1
Labels: locale, shell, toLowerCase, turkish, utf8
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

telman@telman:~$ uname -a
Linux telman 3.5.0-25-generic #39-Ubuntu SMP Mon Feb 25 18:26:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
telman@telman:~$ mongo --version
MongoDB shell version: 2.4.1
telman@telman:~$


Issue Links:
Duplicate
duplicates SERVER-8423 Text search case folding needs utf-8 ... Closed
Related
related to SERVER-1920 Sort by collation Closed
Operating System: Linux
Participants:

 Description   

trynig toLowerCase the following word "ŞİŞLİ" on mongo shell

at the version 2.2.3 this function work properly for turkish people.

"ŞİŞLİ".toLowerCase() is "şişli"

but with version 2.4.1 wi get double dot on "ı".
telman@telman:~$ mongo --version
MongoDB shell version: 2.4.1
telman@telman:~$ mongo uysdb
MongoDB shell version: 2.4.1
connecting to: uysdb
> "ŞİŞLİ".toLowerCase()
şi̇şli̇ //the exact "i" char here have double dot instead of one.
>

I guess you tried to make a support for "İ" char. but the function is wrong

currently I handle this state as below.

this is what the turkish people expected.

the proble is : we have to different character regradin to engli i.

1) I and 2) İ and each lower case of that charcter is just the small version
1) ı and 2) i

breafly it have to be Iı and İi

String.prototype.toTurkishLowerCase = function(){
str = this.replace(/I/g,"ı").replace(/İ/g,"i");//otherwise it
return str.toLowerCase()
};

Thanks for you efforts.

best regards
telman



 Comments   
Comment by Matt Kangas [ 03/Feb/15 ]

Duplicates SERVER-8423

Generated at Thu Feb 08 03:20:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.