You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Nicolai Scheer <sc...@planetavent.de> on 2009/10/16 15:29:34 UTC

pre-commit hook stderr output encoding

Hi!

Today, I stumbled upon a strange issue.

I use ubuntu karmic + apache 2.2.12 for serving a test-repository.

The following pre-commit hook script works perfectly fine:

#!/bin/bash
LC_ALL=en_US.UTF-8
echo "test" >&2
exit 1

However, if I add some german umlaut:

#!/bin/bash
LC_ALL=en_US.UTF-8
echo "test ä" >&2
exit 1

an svn command line client says (either on a remote windows machine or
locally:

Commit blocked by pre-commit hook (exit code 1) with output:
[Error output could not be translated from the native locale to UTF-8]

Locale on the server says:

scheer@karmic-dev:/var/local/svn/repos/test/hooks$ locale -a
C
de_DE
de_DE.utf8
en_AG
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NG
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
POSIX

and the file encoding of the pre-commit file is utf-8.

Is this a client or a server issue? I quickly searched trough the svn
code and found the error message in hooks.c. There it tries to convert
stderr data to utf8. In my case, it should already be utf-8, so I don't
see the point why it fails to do so...

Any suggestions?

Greetings,

Nico

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408257

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: pre-commit hook stderr output encoding

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Oct 16, 2009 at 05:29:34PM +0200, Nicolai Scheer wrote:
> Hi!
> 
> Today, I stumbled upon a strange issue.
> 
> I use ubuntu karmic + apache 2.2.12 for serving a test-repository.
> 
> The following pre-commit hook script works perfectly fine:
> 
> #!/bin/bash
> LC_ALL=en_US.UTF-8
> echo "test" >&2
> exit 1
> 
> However, if I add some german umlaut:
> 
> #!/bin/bash
> LC_ALL=en_US.UTF-8
> echo "test ä" >&2
> exit 1
> 
> an svn command line client says (either on a remote windows machine or
> locally:
> 
> Commit blocked by pre-commit hook (exit code 1) with output:
> [Error output could not be translated from the native locale to UTF-8]
 
> Any suggestions?

This is known: http://subversion.tigris.org/issues/show_bug.cgi?id=2487

Stefan

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2408298

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].