如何更改Cygwin终端中使用的语言?

mrg*_*oom 23 configuration gcc cygwin locale

当我gccCygwin中使用时,我收到俄语的错误消息,例如,如下所示:

$ 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
Run Code Online (Sandbox Code Playgroud)

但是我更喜欢用英语工作.因此,如何永久更改Cygwin终端中使用的语言?

IPr*_*ory 32

尝试设置env变量: LANG='en_GB.UTF-8'

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

  • 帮助http://superuser.com/questions/374892/cygwin-bash-g-is-in-japanese-mode-how-to-set-everything-to-english (3认同)
  • 当然你可以,只需将它添加到`〜/ .bash_profile` - 每次终端启动时都会读取该文件. (2认同)

Raf*_*ael 18

添加:

export LANG='en_GB.UTF-8'
Run Code Online (Sandbox Code Playgroud)

至:

~/.bashrc
Run Code Online (Sandbox Code Playgroud)

为我做了诀窍.