Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I've got a post-commit hook script that performs a SVN update of a working copy when commits are made to the repository.

When users commit to the repository from their Windows machines using TortoiseSVN they get the following error:

post-commit hook failed (exit code 1) with output: svn: Error converting entry in directory '/home/websites/devel/website/guides/Images' to UTF-8 svn: Can't convert string from native encoding to 'UTF-8': svn: Teneriffa-S?\195?\188d.jpg 

The file in question above is: Teneriffa-Süd.jpg notice the accented u. This is because the site is German and the files have been spelt in German.

When executing a update on the working copy at the Linux command-line no errors are encountered. The above error only exists when the post-commit hook is executed via a commit by a Windows SVN client.

Questions:

  1. Why would SVN try to change the encoding of a file?
  2. Are filenames allowed to contain chars that are outside the Windows standard ASCII ones?

Update:

It turns out that the file in question's filename correctly displays as Teneriffa-Süd.jpg when viewed from a Windows machine (via Samba) but when I view the filename from the Linux server (using SSH and PuTTY) where the file resides I get Teneriffa-Süd.jpg

like image 316
Camsoft Avatar asked Jan 22 '10 10:01

Camsoft


1 Answers

Yet another example:

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

(... and all is fine now)

like image 180
Anonymous User Avatar answered Sep 26 '22 10:09

Anonymous User