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

Re: How to set text encoding of svn command line tools

From: Martin v. L÷wis <Martin.vonLoewis_at_hpi.uni-potsdam.de>
Date: 2006-11-12 23:07:58 CET

Norbert Unterberg schrieb:
> I am on a windows box, trying to implement a post-commit hook. I am
> using svnlook to get the current commit's log message, but it is
> always in the text encoding of the windows XP command prompt (cp850 in
> this case). But I need the message in either UTF-8 or ANSI encoding
> (the way it was entered). I tried something like SET LANG=en_US.utf8
> and SET LANG=en_US.utf-8, but all it did was change the subversion
> output language (german to
> english).
>
> So how can I change the text encoding?

Command line tools, on Windows, will use the result of
GetConsoleOutputCP as their output encoding, see
subversion/libsvn_subr/cmdline.c:svn_cmdline_init.

So to change it, you need to change the encoding of the
terminal. Use chcp.exe to do so.

Regards,
Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 12 23:08:19 2006

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