[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

pre-commit hook stderr output encoding

From: Nicolai Scheer <scope_at_planetavent.de>
Date: Fri, 16 Oct 2009 17:29:34 +0200

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_at_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_at_subversion.tigris.org].
Received on 2009-10-16 17:30:40 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.