SVN cannot set LC_CTYPE locale

后端 未结 12 2242
醉话见心
醉话见心 2021-01-30 03:39

I started getting the following error whenever i use SVN in my server:

svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LC_CTYPE is UT         


        
相关标签:
12条回答
  • 2021-01-30 04:18

    Although setting LC_CTYPE to an empty value worked for me, the underlying reason was that the app Terminal on my Mac was setting the locales on startup, even when I SSH to another system.

    This can be fixed in Terminal > Preferences:

    • Select "Profiles" tab and select “Advanced” from sub-tabs
    • Uncheck "Set locale environment variables on startup"
    0 讨论(0)
  • 2021-01-30 04:23

    I got the issue when I connect to a remote ssh server (ssh is used by svnserve -> svn update command).

    The reason is that the remote server does not have the language pack available which is set in $LANG on the local server.

    You can check the installed language packs by 'locale -a'. The $LANG language must be configured on the remote server.

    E.g.

    Local server: LANG=en_US.UTF-8

    Remote server: locale -a -> only de_DE.UTF-8 is available

    Resolution: Just install missing language pack on remote server: dpkg-reconfigure locales;

    btw: the selected default language does not matter.

    0 讨论(0)
  • 2021-01-30 04:25

    commenting out the lines with SendEnv LANG LC_* in /etc/ssh/ssh_config helps to me (openSUSE)

    0 讨论(0)
  • 2021-01-30 04:25

    I found that combining several answers hear yields correct behavior.

    1. We must instal support for the correct locale (localadm for sunos, locale-gen for linux)
    2. We must set LC_ALL to the appropriate locale

    This depends on what kinds of file names you have in your source tree. For example, I have english, hebrew and arabic. en_US.UTF-8 works for me "C" on it's own led to files which I couldn't update.

    0 讨论(0)
  • 2021-01-30 04:26

    If you want to fix this, set the “LC_ALL” variable manually.

    To make it permanent just edit the file “/etc/environment” and add the line:

    LC_ALL=C
    

    Save the file and exit the editor. In order for it to apply you have to logout of the current shell session. The next time you log in, the issue with SVN will be gone.

    0 讨论(0)
  • 2021-01-30 04:28

    LC_ALL and LANG settings did not work for me but LC_CTYPE did.

    LC_CTYPE=en_US.UTF-8
    
    0 讨论(0)
提交回复
热议问题