473,651 Members | 3,011 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.Diagnost ics.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.Diagnost ics.ProcessStar tInfo psi = new
System.Diagnost ics.ProcessStar tInfo( @"C:\Program
Files\Subversio nSVN\Subversion \bin\svn.exe", "info
\"http://svn/baserepo/trunk/Database/Stored Procedures/\"" );
psi.CreateNoWin dow = true;
psi.ErrorDialog = false;
psi.UseShellExe cute = false;
psi.RedirectSta ndardError = true;
psi.RedirectSta ndardOutput = true;

System.Diagnost ics.Process svn = System.Diagnost ics.Process.Sta rt( psi );

System.IO.Strea mReader outputStream = svn.StandardOut put;

string output = outputStream.Re adToEnd();
System.Diagnost ics.Debug.Write Line(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 1428

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

Similar topics

0
1693
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 japanese characters, the parsing goes thro' properly. Here is the sample document that is causing the problem. <root>
2
2258
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 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. In order to do this, I spawned two threads.
3
2553
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 of unreadable characters on my label. Are there settings/properties for a label on a windows form to be able to read japanese text? Is it when I raed the file that it gets screwed up (I use fileOpen and LineInput)? Looking for pointers here
5
3659
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 I cant make it work, it always stalls when I try to read the output: /// code 1 Process ftpProcess = new Process();
4
13131
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 result. I want to display that output as it happens in my UI. I don't see a clean way to do this. After my Start() call, I made a call to StandardOutput.ReadToEnd() but it appears to hang until the process finishes (makes sense) But what do...
4
4242
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 square. I set the culture of the .aspx page to japanese, and even though my browser already prints asian characters, I added the Japanese to it also. My web config has the utf-8 line in it. What should I do? Thanks,
2
2276
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. In order to do this, I spawned two threads. My code looks something like this ' Starting the process oProcessStartInfo = New ProcessStartInfo()
2
8628
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 and this seems an ideal solution. I'm running it as a process and re-directing the standardinput/output/error However, despite working through all the different variations of code I can either think of or find I am unable to achieve true...
5
3440
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 "notes" not being the issue). Beginning with... Dim objProcess As Process Dim objProcessStartInfo As New ProcessStartInfo
0
8278
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8807
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8701
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8584
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7299
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4144
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2701
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 we have to send another system
1
1912
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.