Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the language used within the Cygwin terminal?

When I'm using gcc in Cygwin I'm getting error messages in Russian which, for instance, looks like the following:

$ gcc -Wall kmeans.c -o kmeans
kmeans.c:260:1: предупреждение: неявное приведение большого целого значения к беззнаковому типу [-Woverflow]
 size_t used_size = ULLONG_MAX; // size of each file used, binary file only

However I prefer to work in English. Thus, how can I change permanently the language that is used within the Cygwin terminal?

like image 580
mrgloom Avatar asked Mar 26 '14 10:03

mrgloom


People also ask

How do I open a Cygwin terminal?

If you right-click on a . txt file and select "open with" you should be able to click "Browse" and go to C:\cygwin\bin\vim-nox.exe . Then you can click "Always use the selected program to open this kind of file".

How do I change the path in Cygwin?

Update the PATH environment variable: From the Start menu, select Parameters > Control Panel > System. Select the Advanced tab and click Environment variables. Edit the PATH environment variable to add the Cygwin installation directory, for example c:\cygwin\bin; and click OK.


3 Answers

Try set env variable: LANG='en_GB.UTF-8'

Reference: http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Environment-Variables.html#Environment-Variables/

like image 155
IProblemFactory Avatar answered Oct 22 '22 05:10

IProblemFactory


adding:

export LANG='en_GB.UTF-8'

to:

~/.bashrc

did the trick for me.

like image 23
Raffael Avatar answered Oct 22 '22 07:10

Raffael


In my case the problem was fixed after changing locale (en_GB) and character set (UTF-8) on the Text page of the mintty Options

enter image description here

like image 39
Oleg Svechkarenko Avatar answered Oct 22 '22 05:10

Oleg Svechkarenko