Case-insensitive C locale

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm trying to create a custom locale for use with the LC_COLLATE variable which sorts files just like the C locale, with the only exception that it sorts case-insensitively. I need this because I have lots of files with special (Japanese) characters in their names which just get scattered around randomly across the folder when using the en_US locale for LC_COLLATE. Setting LC_COLLATE to C fixes this issue, however it introduces case-sensitivity which can get annoying when downloading files from the Internet which were named on the assumption that case wouldn't matter.



It was easy enough to create a custom locale based on the C locale which sorts AaBbCc... instead of ABC...abc... and this does alleviate the issue somewhat, but I can't figure out how to get it to treat uppercase and lowercase Latin letters as the same character while sorting as it does with the en_US locale (based on what I'm seeing in the iso14651_t1_common file it does look more complicated than I'd hope).



(I know there are file managers which offer the option to ignore case but I'd prefer not having to ditch a program just because it lacks this option (as many do).)









share







New contributor




konira11 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    0
    down vote

    favorite












    I'm trying to create a custom locale for use with the LC_COLLATE variable which sorts files just like the C locale, with the only exception that it sorts case-insensitively. I need this because I have lots of files with special (Japanese) characters in their names which just get scattered around randomly across the folder when using the en_US locale for LC_COLLATE. Setting LC_COLLATE to C fixes this issue, however it introduces case-sensitivity which can get annoying when downloading files from the Internet which were named on the assumption that case wouldn't matter.



    It was easy enough to create a custom locale based on the C locale which sorts AaBbCc... instead of ABC...abc... and this does alleviate the issue somewhat, but I can't figure out how to get it to treat uppercase and lowercase Latin letters as the same character while sorting as it does with the en_US locale (based on what I'm seeing in the iso14651_t1_common file it does look more complicated than I'd hope).



    (I know there are file managers which offer the option to ignore case but I'd prefer not having to ditch a program just because it lacks this option (as many do).)









    share







    New contributor




    konira11 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm trying to create a custom locale for use with the LC_COLLATE variable which sorts files just like the C locale, with the only exception that it sorts case-insensitively. I need this because I have lots of files with special (Japanese) characters in their names which just get scattered around randomly across the folder when using the en_US locale for LC_COLLATE. Setting LC_COLLATE to C fixes this issue, however it introduces case-sensitivity which can get annoying when downloading files from the Internet which were named on the assumption that case wouldn't matter.



      It was easy enough to create a custom locale based on the C locale which sorts AaBbCc... instead of ABC...abc... and this does alleviate the issue somewhat, but I can't figure out how to get it to treat uppercase and lowercase Latin letters as the same character while sorting as it does with the en_US locale (based on what I'm seeing in the iso14651_t1_common file it does look more complicated than I'd hope).



      (I know there are file managers which offer the option to ignore case but I'd prefer not having to ditch a program just because it lacks this option (as many do).)









      share







      New contributor




      konira11 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I'm trying to create a custom locale for use with the LC_COLLATE variable which sorts files just like the C locale, with the only exception that it sorts case-insensitively. I need this because I have lots of files with special (Japanese) characters in their names which just get scattered around randomly across the folder when using the en_US locale for LC_COLLATE. Setting LC_COLLATE to C fixes this issue, however it introduces case-sensitivity which can get annoying when downloading files from the Internet which were named on the assumption that case wouldn't matter.



      It was easy enough to create a custom locale based on the C locale which sorts AaBbCc... instead of ABC...abc... and this does alleviate the issue somewhat, but I can't figure out how to get it to treat uppercase and lowercase Latin letters as the same character while sorting as it does with the en_US locale (based on what I'm seeing in the iso14651_t1_common file it does look more complicated than I'd hope).



      (I know there are file managers which offer the option to ignore case but I'd prefer not having to ditch a program just because it lacks this option (as many do).)







      sort locale





      share







      New contributor




      konira11 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      konira11 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      konira11 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 4 mins ago









      konira11

      1




      1




      New contributor




      konira11 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      konira11 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      konira11 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          konira11 is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475156%2fcase-insensitive-c-locale%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          konira11 is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          konira11 is a new contributor. Be nice, and check out our Code of Conduct.












          konira11 is a new contributor. Be nice, and check out our Code of Conduct.











          konira11 is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475156%2fcase-insensitive-c-locale%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?