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

MongoDB should behave identically when installed on any locale OS.



    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Aggregation Framework
    • Labels:


      I found that for all practical purposes MongoDB can be installed on a unix server of any locale (English, Spanish, Chinese, whatever) without changing behaviour. Except for the following two points:

      1. There are 3 case-related aggregation functions that use the (g)libc `tolower`, `toupper`, `strcasecmp` functions.
      2. strerr() output from (g)libc that is reprinted in error responses or in the log will be in the OS locale.

      #2 is no big deal, it doesn't affect the correctness of the DB in any way.

      But #1, by itself, ruins our ability to say "MongoDB can be installed on a server with any locale". I was originally pleasantly surprised to figure out how little effect locale could have on a mongod process, but I found that the user was just hearing "broken", "broken", "broken" when I explained there was this one exception.

      I suggest that $strcasecmp, $toUpper and $toLower be changed to use the ICU equivalents instead of the libc functions, using simple case mapping / folding per http://userguide.icu-project.org/transforms/casemappings.




            • Votes:
              0 Vote for this issue
              9 Start watching this issue


              • Created: