Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9367

toLowerCase() function does not work for Turkish char "İ"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: 2.4.1
    • Fix Version/s: None
    • Component/s: Shell
    • Environment:
    • Operating System:
      Linux

      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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: