Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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|improve this answer
1  
Thks ! I put SET LANG=fr_FR.UTF-8 in the file Cygwin.bat and it works now :) –  bob l'éponge est un con Apr 18 '11 at 10:30
    
You're welcome. Any idea where the LANG=FR setting came from? That might be helpful for others encountering the same issue. –  ak2 Apr 18 '11 at 11:39
    
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. –  bob l'éponge est un con Apr 18 '11 at 19:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.