djangopython-2.7encodingutf-8pysvn

Can't convert string from 'UTF-8' to native encoding for pysvn export


I was running pysvn's export of a repo with file names with french letters like "Français" or "Spécifications du produit". When the export runs, the following error is returned

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

I found this http://refactor.se/2007/08/13/svn-fix-cant-convert-string-from-utf-8-to-native-encoding/ and Can't convert string from 'UTF-8' to native encoding

indicating something about setting the local language but I couldn't find this in pysvn. Is it possible to set this when initializing a pysvn Client?

EDIT: Forgot to mention i'm doing this on django 1.7

Thanks


Solution

  • In case somebody comes across this in the future, what i did was i copied the initLocale() function from pysvn in this file

    http://pysvn.tigris.org/source/browse/pysvn/trunk/pysvn/Extension/Examples/Client/svn_cmd.py?view=log

    and then called this before the initialization of the svn Client. SVN worked afterwards