473,503 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem parsing Process StandardOutput in Japanese regional settin

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
0 1419

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1666
by: Prakash | last post by:
Hi all, I am trying a parse a xml document containing japanese text by constructing a DOMBuilder object. The document created after parsing is empty. If the xml document does not contain...
2
2239
by: mwazir | last post by:
Hi all, I have reposted this question from dotnet.general as I have been advised that this is a more appropriate forum for this question. Apologies for the repost. I have a process thats...
3
2514
by: Benoit Martin | last post by:
in my windows app, I have some japanese text that I load from a text file and display on a label. No matter what type of encoding I try to use on the text file, the text always comes up as a bunch...
5
3642
by: ask | last post by:
Hi NG I'm a bit new to programming c# and have a question regarding ftp by the command prompt. As far as I can see it should be possible to start a process and pipe command streams into it. But...
4
13084
by: Steve | last post by:
I am using Diagnostics.Process to, well.. execute a process. I would like to display the output of the process to my UI as it is created. For example, ping www.yahoo.com will slowly output each...
4
4224
by: Spencer H. Prue | last post by:
Hello, I am trying to print a unicode character that's in Japanese. In my ASP.NET app (C#) I just set a char to that unicode character and use a response.write(). The char prints, but it is just a...
2
2264
by: mwazir | last post by:
Hi all, I have a process thats starts in my application and only terminates when my application is terminated. I want to write the output and the errors of this process to a seperate log file....
2
8620
by: Al | last post by:
I'm currently attempting to use PLink (the console component of PUTTY - see http://www.chiark.greenend.org.uk/~sgtatham/putty/) as a Telnet component as I may in future need to change to using SSH...
5
3417
by: =?Utf-8?B?Z215ZXJz?= | last post by:
Hello, I am attempting to start a cmd.exe process and pass several .vbs scripts (with additional parameters) and then read the output from the scripts and make "notes" in a DataTable (the...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.