SVN Error: Can't convert string from native encoding to 'UTF-8' SVN Error: Can't convert string from native encoding to 'UTF-8' linux linux

SVN Error: Can't convert string from native encoding to 'UTF-8'


Yet another example:

$ svn updatesvn: Error converting entry in directory '.' to UTF-8svn: Can't convert string from native encoding to 'UTF-8':$ export LC_CTYPE=en_US.UTF-8$ svn update

(... and all is fine now)


  1. It does not change the encoding of the file. It changes the encoding of the filename (to something that every client can hopefully understand).
  2. Allowed by whom ? NTFS uses 16-bit code points, and Windows can expose the file names in various encodings, based on how you ask for it (it will try to convert them to the encoding you ask for). Now... That bit (how you ask) depends on the specific svn client you use. It sounds to me like a bug in TortoiseSVN.

Edit to add:

Ugh. I misunderstood the symptoms. the svn server stores everything in utf-8 (and it seems that it did that successfully).

The post-commit hook is the bit that fails to convert from UTF-8. If I understand what you're saying correctly, the post-commit hook on the server triggers an svn update to a shared drive (the svn server therefore starts an svn client to itself...) ? This means that the configuration that needs to be fixed is the one for the client on the server. Check the LANG / LC_ALL on the environment executing the svn server.. As it happens, the hooks are run in a vacuum environment (see Tip). So you should set the variable in the hook itself.

See also this page for info on how svn handles localisation


If Error is -

[abc@288832-web3 public_html]$ svn updatesvn: Error converting entry in directory 'images' to UTF-8svn: Valid UTF-8 data(hex: 46 65 6e 65 72 62 61 68)followed by invalid UTF-8 sequence(hex: e7 65 2b 46)

Then do this.

[abc@288832-web3 public_html]$ printf "\x46\x65\x6e\x65\x72\x62\x61\x68\n"Fenerbah  

(This means that the system has some file name starting with "Fenerbah" in that folder.)

[abc@288832-web3 public_html]$ cd  images[abc@288832-web3 images]$ rm -rf Fenerbahçe+Forma+2.jpg

So you can see that there is a special character in the name and it is not supported by SVN.