[Svnmerge] Unicode in log messages

Benson Margulies bimargulies at gmail.com
Fri Oct 9 17:05:09 PDT 2009


fromBenson Margulies <bimargulies at gmail.com>toRaman Gupta <
rocketraman at fastmail.fm>
dateFri, Oct 9, 2009 at 7:03 PMsubjectRe: [Svnmerge] Unicode in log messages
mailed-bygmail.com
hide details 7:03 PM (1 hour ago)

my personal log-encoding is not set. My local svn server expert writes:


http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html does
mention

 log-encoding

   This variable sets the default character set encoding for commit log
messages. It's a permanent form of the --encoding option (see the section
called "svn Options"). The Subversion repository stores log messages in
UTF-8 and assumes that your log message is written using your operating
system's native locale. You should specify a different encoding if your
commit messages are written in any other encoding.


So now I can offer a recipe.

1) Pass --encoding utf-8 to the svn log command. Now you know what is coming
out of the command.
2) pass the utf-8 coded into the decode.
3) either (a) always write UTF-8 files, or (b) have an option to allow the
user to say what sort of file they want to edit.



On Fri, Oct 9, 2009 at 6:28 PM, Raman Gupta <rocketraman at fastmail.fm> wrote:

> Benson Margulies wrote:
> > It's still mac-roman after running the other python you sent.
>
> Ok.
>
> > If decoding with sys.stdout.... works, and that is UTF-8, then it cannot
> > be true that svn itself is disgorging in the defaultlocale, since the
> > Arabic would be corrupted. It really seems that svn log is delivering
> > sys.stdout.encoding.
>
> It looks like your issue is not reading the data output by svn log,
> but rather when svn reads the data that svnmerge has created for the
> merge commit log message.
>
> svnmerge appears to think that the encoding of that file needs to be
> mac-roman, while svn seems to expect utf-8.
>
> Can you check in your subversion config whether you have the
> log-encoding config value specified?
>
> > So, the problem happens when this is different from the defaultlocale
> > encoding. Thus my desire to be able to control/specify the file encoding.
>
> I'd rather setup svnmerge.py to automatically select the right
> encoding if possible.
>
> Cheers,
> Raman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/svnmerge/attachments/20091009/6ddffe3d/attachment.html>


More information about the Svnmerge mailing list