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

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;

                  procDump.Start();

                  StreamReader srProc = procDump.StandardOutput;

                  string sResult = srProc.ReadToEnd();

                  procDump.WaitForExit();

 

 

The problem is, when I write sResult to a file:

 

                  System.IO.FileStream fs = new FileStream(@"C:\temp\svndump.svn", FileMode.OpenOrCreate);

                  fs.Write(System.Text.Encoding.ASCII.GetBytes(strResult), 0,

                        sResult.Length);

                  fs.Flush();

                  fs.Close();

 

 

...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:

˙ūS

 

And the stdout I capture and ASCII encode has the following:

??S

 

(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.

 

Arthur
Received on Fri Mar 26 22:12:30 2004

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