By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,075 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

Problem parsing Process StandardOutput in Japanese regional settin

P: n/a
I'm trying to run the svn command in a System.Diagnostics.Process to parse
the StandardOutput. If I run the command in a CMD window while Regional
settings are set to Japanese I see something like the following:

C:\>svn info "http://svn/baserepo/trunk/Database/Stored Procedures/"
?\227?\131?\145?\227?\130?\185: Stored Procedures
URL: http://svn/baserepo/trunk/Database/Stored%20Procedures
?\227?\131?\170?\227?\131?\157?\227?\130?\184?\227 ?\131?\136?\227?\131?\170?\227?\129?\174?\227?\131 ?\171?\227?\131?\188?\227?\131?\136:
http://svn/baserepo
?\227?\131?\170?\227?\131?\157?\227?\130?\184?\227 ?\131?\136?\227?\131?\170
UUID: d74c165d-61f5-9b4d-8219-8b8449e600ec
?\227?\131?\170?\227?\131?\147?\227?\130?\184?\227 ?\131?\167?\227?\131?\179:
56
?\227?\131?\142?\227?\131?\188?\227?\131?\137?\231 ?\168?\174?\229?\136?\165:
?\227?\131?\135?\227?\130?\163?\227?\131?\172?\227 ?\130?\175?\227?\131?\136?\227?\131?\170
?\230?\156?\128?\231?\181?\130?\229?\164?\137?\230 ?\155?\180?\232?\128?\133:
myusername
?\230?\156?\128?\231?\181?\130?\229?\164?\137?\230 ?\155?\180?\227?\131?\170?\227?\131?\147?\227?\130 ?\184?\227?\131?\167?\227?\131?\179: 56
?\230?\156?\128?\231?\181?\130?\229?\164?\137?\230 ?\155?\180?\230?\151?\165?\230?\153?\130: 2006-04-26 14:59:42 -0600

When run in the CMD window in English regional settings I get the following:
C:\_temp>svn info "http://svn/baserepo/trunk/Database/Stored Procedures/"
Path: Stored Procedures
URL: http://svn/baserepo/trunk/Database/Stored%20Procedures
Repository Root: http://svn/baserepo
Repository UUID: d74c165d-61f5-9b4d-8219-8b8449e600ec
Revision: 56
Node Kind: directory
Last Changed Author: myusername
Last Changed Rev: 56
Last Changed Date: 2006-04-26 14:59:42 -0600 (Wed, 26 Apr 2006)

When run in C# in Japanese regional settings, the output is the following:
__: Stored Procedures
URL: http://svn/baserepo/trunk/Database/Stored%20Procedures
_________: http://svn/baserepo
_____ UUID: d74c165d-61f5-9b4d-8219-8b8449e600ec
_____: 56
_____: ______
_____: myusername
_________: 56
______: 2006-04-26 14:59:42 -0600 (_, 26 4 2006)

Here's the code:

System.Diagnostics.ProcessStartInfo psi = new
System.Diagnostics.ProcessStartInfo( @"C:\Program
Files\SubversionSVN\Subversion\bin\svn.exe", "info
\"http://svn/baserepo/trunk/Database/Stored Procedures/\"" );
psi.CreateNoWindow = true;
psi.ErrorDialog = false;
psi.UseShellExecute = false;
psi.RedirectStandardError = true;
psi.RedirectStandardOutput = true;

System.Diagnostics.Process svn = System.Diagnostics.Process.Start( psi );

System.IO.StreamReader outputStream = svn.StandardOutput;

string output = outputStream.ReadToEnd();
System.Diagnostics.Debug.WriteLine(output);

Anyone have any idea how to get something readable back other than "_____"
from the portions of the output that are Unicode?

Thanks,
Mike
Apr 27 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.