CYGWIN locale problem

5,281

FR is not a valid Cygwin locale. It should be something like fr_FR, fr_FR.UTF-8, or the default C.UTF-8. Check the setting of the LANG environment variable (or possibly LC_COLLATE or LC_ALL). If you didn't set it to FR, chances are that some other software set it in the Windows environment. MS's "Subsystem for Unix-based Applications" perhaps?

Windows-wide environment variables can be changed via the Advanced tab of the System Properties control panel. If you don't want to do that, and if you're using Cygwin's default console, you could set LANG in C:\cygwin\cygwin.bat. If you're using the mintty terminal, you can set the locale on the Text page of its options. (Note that setting the locale in ~/.profile or one of the other bash startup files would be too late for bash itself.)

Share:
5,281

Related videos on Youtube

fego
Author by

fego

My work : java developer, interested in a lot of topics. Clean code / TDD. For ever on the learning road. I am a board game designer too (Pix, Loony Quest, SMS, Dream Catcher).

Updated on September 18, 2022

Comments

  • fego
    fego over 1 year

    I have the following cygwin installation:

    CYGWIN_NT-6.1-WOW64. 
    

    When I launch it, I have this message:

    bash: warning: setlocale: LC_COLLATE: cannot change locale (FR)
    

    I'm using Windows 7 64 bit.

    Any ideas?

  • fego
    fego about 13 years
    Thks ! I put SET LANG=fr_FR.UTF-8 in the file Cygwin.bat and it works now :)
  • eylon shabtay
    eylon shabtay about 13 years
    You're welcome. Any idea where the LANG=FR setting came from? That might be helpful for others encountering the same issue.
  • fego
    fego about 13 years
    No idea yet. It was strange because if I started Cygwin after the startup of windows it was ok, but if I left Cygwin and started it again the problem appeared.