21 December 2009 View Comments

svn: Can’t convert string from ‘UTF-8′ to native encoding:


Filenames containing "special characters" can cause an annoying Subversion error message:

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

From the subversion book:

Errors like this typically occur when the Subversion client has received a UTF-8 string from the repository, but not all of the characters in that string can be represented using the encoding of the current locale. For example, if your locale is en_US but a collaborator has committed a Japanese filename, you’re likely to see this error when you receive the file during an svn update.

To fix this error message you have to set your current locale appropriately:

export LC_CTYPE=en_US.UTF-8
locale
svn update
Untitled 
Tags:
blog comments powered by Disqus