<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Sometimes, it's Unicode or nothing...</title><link>http://blogs.msdn.com/b/michkap/archive/2012/04/09/10291883.aspx</link><description>The question was simple enough: 
 I have a cmd line tool. On French Windows its output is correct in the cmd window but when I redirect it to a file it is no longer good. I noticed that if I set the output encoding on the Console class explicitly to</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Sometimes, it's Unicode or nothing...</title><link>http://blogs.msdn.com/b/michkap/archive/2012/04/09/10291883.aspx#10292374</link><pubDate>Tue, 10 Apr 2012 20:04:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10292374</guid><dc:creator>Random832</dc:creator><description>&lt;p&gt;Of course, this only works if you want to make a UTF-8 text file. If you want to make an OEM text file, leave it as CP_OEMCP. If you want to make an ANSI text file...&lt;/p&gt;
&lt;p&gt;Of course, if your output is to a pipe to a tool that expects OEM text, such as, I don&amp;#39;t know, &amp;quot;more&amp;quot;, then you really do need it in CP_OEMCP. On balance it&amp;#39;s probably best to have a specific option for making output files (in whatever encoding), use WriteConsoleW for console output, and just leave things alone if the output is a pipe.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10292374" width="1" height="1"&gt;</description></item><item><title>re: Sometimes, it's Unicode or nothing...</title><link>http://blogs.msdn.com/b/michkap/archive/2012/04/09/10291883.aspx#10292083</link><pubDate>Tue, 10 Apr 2012 01:51:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10292083</guid><dc:creator>Michael S. Kaplan</dc:creator><description>&lt;p&gt;Ha!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10292083" width="1" height="1"&gt;</description></item><item><title>re: Sometimes, it's Unicode or nothing...</title><link>http://blogs.msdn.com/b/michkap/archive/2012/04/09/10291883.aspx#10291945</link><pubDate>Mon, 09 Apr 2012 17:22:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10291945</guid><dc:creator>Claudia Lawrence</dc:creator><description>&lt;p&gt;Thank you. &amp;nbsp;That really opened the kimono for me. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10291945" width="1" height="1"&gt;</description></item></channel></rss>