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

chcp has no effect on output encoding for chcp

From: Matthias Ludwig <matthias-ludwig_at_gmx.net>
Date: Mon, 7 Sep 2015 11:45:13 +0200

Hello,

I'm using svnlook on a precommit-hook and have some problems with the output
encoding.
Os: windows 7
Apache 2.4
Apache subversion: testet version 1.8 / 1.9 from different distributions see
below

how does svnlook determine the output encoding?

I found statements that the output encoding ist depending on the active code
page (chcp) of he Console.

But I made the following observations:

Binary distribution from http://sourceforge.net/projects/win32svn/ (Build
wie Visual C++ 6.0):
Chcp does directly set the output encoding.
Binary distribution is discontinued for svn 1.9

All other distributions build with higher Visual Studios (apache haus,
tortoisesvn, VisualSVN, ...):
Chch has no effect tot he output encoding of svnlook. I observed that the
output on my machine is alway encoded in CP 1252.

I suppose the behaviour is related to the following commit:

Revision: 1530582
Author: rhuijben
Date: Mittwoch, 9. Oktober 2013 14:34:11
Message:
Hide some essentially dead code by using the preprocessor.

* subversion/libsvn_subr/cmdline.c
  (CMDLINE_USE_CUSTOM_ENCODING): New macro. Document why this still exists.
  (input_encoding,
   output_encoding): Disable when CMDLINE_USE_CUSTOM_ENCODING is not
defined.

  (svn_cmdline_init): Use CMDLINE_USE_CUSTOM_ENCODING as condition around
    initializing the encoding usage.

  (svn_cmdline_cstring_from_utf8,
   svn_cmdline_cstring_to_utf8,
   svn_cmdline_output_encoding): Use preprocessor instead of runtime check
    for the 99.9% case.

Is it feature by design that chcp has no effect on the output encoding.
how does svnlook determine the output encoding?

The use of the subversion language bindings is no alternative because there
exists no language bindings for svnlook. Svnkit does a reimplementation and
is not implemented for 1.9 yet.

Thank you,
cheers
Matthias
Received on 2015-09-07 11:45:18 CEST

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