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

Batch files, umlauts and svn status

From: Niemann, Hartmut <hartmut.niemann_at_siemens.com>
Date: Fri, 30 Jun 2017 15:13:50 +0000

Hello!

I want to parse svn status output with a batch file on Windows 7 (and feed it back to svn diff and some other tools doing svn cat)

See the attached screen shot.

In plain text:
I run
        svn status

(Tortoise SVN 1.9.4 command line client) and it reports a file whose directory name contains umlauts.
If I use the default code page 437, the path is displayed fine.

I loop over the output with
        for /F "usebackq tokens=1,*" %i in (`svn status`) DO echo "%j" & dir "%j"
and the displayed path consists of graphical glyphs, and dir won't find it.

I switch to cp1252. svn status displays exactly the string seen the step before.

I loop over the output with
        for /F "usebackq tokens=1,*" %i in (`svn status`) DO echo "%j" & dir "%j"
and the filename is still displayed with weird graphics, but it is found.

If I loop over svn status output, obviously the encoding of umlauts changes in some mysterious way to code page 1252.
I can change the codepage to cp1252, but then the plain svn status output is garbled.

What am I seeing here?
What is the safest way to handle umlauts with svn in batch files?

Mit freundlichen Grüßen
Dr. Hartmut Niemann

Siemens AG
Mobility Division
Mainline Transport
Standardization, Remote Control, Display
MO MLT LM EN CCI SRD
Werner-von-Siemens-Str. 67
91052 Erlangen, Deutschland
Mobil: +49 173 5342327
mailto:hartmut.niemann_at_siemens.com

www.siemens.com/ingenuityforlife

Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Gerhard Cromme; Vorstand: Joe Kaeser, Vorsitzender; Roland Busch, Lisa Davis, Klaus Helmrich, Janina Kugel, Cedrik Neike, Michael Sen, Ralf P. Thomas; Sitz der Gesellschaft: Berlin und München, Deutschland; Registergericht: Berlin Charlottenburg, HRB 12300, München, HRB 6684; WEEE-Reg.-Nr. DE 23691322

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3253067

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].

svn-status.png
Received on 2017-07-01 02:44:40 CEST

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

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