开发者

SvnNotify: svn log message gets bad chars when executed from hook but not from the command line

When I execute my svn post-commit hook from the command line I get the SVN log message well formatted. When I execute it from the hook (real commit test) I get the log message with bad charset. Looked everywhere but I cannot figure i开发者_如何学JAVAt out. Any help will be appreciated.

My post commit script:

REPOS="$1"
REV="$2"
CS="UTF-8"
USERS="blahblah@gmail.com"

svnnotify --charset $CS --svn-encoding $CS --css-inline --repos-path "$1" --revision "$2" --subject-prefix "[SuperProj-Commit]-" --to $USERS --handler HTML::ColorDiff -d

I get this:

[SuperProj-Commit]-[48] - testando acentua?\195?\167?\195?\163o!

In the subject line and in the body of the message as well. The problem is ONLY in the svn log message. Characters showing up in the diff are showing up correctly.


First install your language locale here: http://ubuntuforums.org/showthread.php?t=196414

Then do inside your post-commit:

export LANG=your_new_locale

To list the locales available in your linux system you can do:

locale -a
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜