svnadmin dump encoding?
From: Arthur Penn <APenn_at_quilogy.com>
Date: 2004-03-26 22:12:02 CET
I am trying to write a little C# utility to find all the repositories under my Subversion root folder, dump them, Zip the output, and move the Zip files to a specified location. I am redirecting the stdout from the svnadmin process as shown below:
psiDump.UseShellExecute = false;
psiDump.RedirectStandardOutput = true;
procDump.StartInfo = psiDump;
StreamReader srProc = procDump.StandardOutput;
string sResult = srProc.ReadToEnd();
The problem is, when I write sResult to a file:
System.IO.FileStream fs = new FileStream(@"C:\temp\svndump.svn", FileMode.OpenOrCreate);
...and diff the file with the direct output from Subversion, I find some character encoding differences. svnadmin writes the following at the start of some of the lines:
And the stdout I capture and ASCII encode has the following:
(Sorry, my diff tool doesn't let me expose the hex values.)
Does anyone have any idea what type of encoding I could use on the stdout captured from svnadmin to make this work, or what the problem might be? I've tried every encoding System.Text.Encoding exposes (ASCII, UTF7, UTF8, Unicode) except for BigEndianUnicode. Thanks for any input you might provide.
This is an archived mail posted to the Subversion Users mailing list.