Svn Error: Can't Convert String from Native Encoding to 'Utf-8'

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

  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

SVN update failing: E000022: Can't convert string from 'UTF-8' to native encoding

exec opens a new shell every time it is invoked. You need to create a batch file which executes both commands in a single exec call.

If you are working on windows, you may still out of luck as the encoding is not always able to convert everything as the standard cmd font cannot display all utf-8 codes (you may need to change the default font to a utf-8 capable font like Courier new)

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

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

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

JavaHL is only a wrapper to SVN. As i see it JavaHL calls the svn command (svn diff...) and parses the returned message. The command you try to execute returns the info that in this diff some property changed (in german Eigenschaftsänderung). Unfortunately the terminal which handled the call messed up the encoding. The result is a "RA layer request failed" (ZM-Schicht Anforderung gescheitert) which simply means that JavaHL was not able to parse the returned message.

Things you can try:

  1. start eclipse with LC_MESSAGES="en_US.UTF-8" /path/to/eclipse/eclipse and maybe JavaHL will call the svn executable with english messages

  2. check the terminal from which you start Eclipse. Does it support unicode? (rxvt does not, where urxvt does)

    type ä in your terminal and check the output. You should see the ä as readable character. As you can see from my output the character should be encoded as \303\244 and not \195\164 (303 is the octal representation for 195 in decimal, and 244(oct) == 164(dec))

    $ ä
    bash: $'\303\244': command not found

Hope this helps.

php exec SVN empty output, works fine in terminal under same user

The exit status (1) indicates that the command fails for some reason. To find out the reason, you need to capture the standard error with the help of proc_open function as shown in this answer. The exec function captures only the standard output.

Howto Config mod_dav_svn locale under apache2?

edit /etc/apache2/envvars, change LANG from C to your locale language setting.

I did the following modification, then restarted apache2, no more problem.

export LANG=C --> export LANG="en_US.UTF-8"



Related Topics



Leave a reply



Submit