<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Internationalization Cookbook</title>
	<atom:link href="http://mihai-nita.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://mihai-nita.net</link>
	<description></description>
	<lastBuildDate>Tue, 09 Aug 2011 08:44:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on ToUnicode - Automating some of the steps of Unicode code conversion (Windows) by Mihai</title>
		<link>http://mihai-nita.net/2007/12/19/tounicode-automating-some-of-the-steps-of-unicode-code-conversion-windows/#comment-1131</link>
		<dc:creator>Mihai</dc:creator>
		<pubDate>Tue, 09 Aug 2011 08:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://mihai-nita.net/?p=183#comment-1131</guid>
		<description>I know about that (and others :-)), but the &quot;parser&quot; is not smart enough for that, and I don&#039;t feel like writing a full C/C++ parser :-)</description>
		<content:encoded><![CDATA[I know about that (and others <img src='http://mihai-nita.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ), but the "parser" is not smart enough for that, and I don't feel like writing a full C/C++ parser <img src='http://mihai-nita.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ]]></content:encoded>
	</item>
	<item>
		<title>Comment on ToUnicode - Automating some of the steps of Unicode code conversion (Windows) by Mihai</title>
		<link>http://mihai-nita.net/2007/12/19/tounicode-automating-some-of-the-steps-of-unicode-code-conversion-windows/#comment-1130</link>
		<dc:creator>Mihai</dc:creator>
		<pubDate>Tue, 09 Aug 2011 08:43:25 +0000</pubDate>
		<guid isPermaLink="false">http://mihai-nita.net/?p=183#comment-1130</guid>
		<description>Yes. But the default should also be smarter about line breaks. I have to figure out what do I have to change in configuration.</description>
		<content:encoded><![CDATA[Yes. But the default should also be smarter about line breaks. I have to figure out what do I have to change in configuration.]]></content:encoded>
	</item>
	<item>
		<title>Comment on ToUnicode - Automating some of the steps of Unicode code conversion (Windows) by Roger Bamforth</title>
		<link>http://mihai-nita.net/2007/12/19/tounicode-automating-some-of-the-steps-of-unicode-code-conversion-windows/#comment-1042</link>
		<dc:creator>Roger Bamforth</dc:creator>
		<pubDate>Wed, 20 Jul 2011 09:52:07 +0000</pubDate>
		<guid isPermaLink="false">http://mihai-nita.net/?p=183#comment-1042</guid>
		<description>So how do format stuff so it&#039;s readable? Should I be using HTML tags?</description>
		<content:encoded><![CDATA[So how do format stuff so it's readable? Should I be using HTML tags?]]></content:encoded>
	</item>
	<item>
		<title>Comment on ToUnicode - Automating some of the steps of Unicode code conversion (Windows) by Roger Bamforth</title>
		<link>http://mihai-nita.net/2007/12/19/tounicode-automating-some-of-the-steps-of-unicode-code-conversion-windows/#comment-1041</link>
		<dc:creator>Roger Bamforth</dc:creator>
		<pubDate>Wed, 20 Jul 2011 09:49:33 +0000</pubDate>
		<guid isPermaLink="false">http://mihai-nita.net/?p=183#comment-1041</guid>
		<description>There&#039;s another thing that I&#039;d not seen mentioned anywhere until I thought about it, started googling and found this thread.

http://www.tech-archive.net/Archive/VC/microsoft.public.vc.mfc/2007-09/msg00867.html

Visual Studio puts this code at the top of each .cpp file

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

THIS_FILE[] should NOT be changed to a TCHAR.</description>
		<content:encoded><![CDATA[There's another thing that I'd not seen mentioned anywhere until I thought about it, started googling and found this thread.

<a href="http://www.tech-archive.net/Archive/VC/microsoft.public.vc.mfc/2007-09/msg00867.html" rel="nofollow">http://www.tech-archive.net/Archive/VC/microsoft.public.vc.mfc/2007-09/msg00867.html</a>

Visual Studio puts this code at the top of each .cpp file

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

THIS_FILE[] should NOT be changed to a TCHAR.]]></content:encoded>
	</item>
	<item>
		<title>Comment on ToUnicode - Automating some of the steps of Unicode code conversion (Windows) by Roger Bamforth</title>
		<link>http://mihai-nita.net/2007/12/19/tounicode-automating-some-of-the-steps-of-unicode-code-conversion-windows/#comment-963</link>
		<dc:creator>Roger Bamforth</dc:creator>
		<pubDate>Thu, 07 Jul 2011 12:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://mihai-nita.net/?p=183#comment-963</guid>
		<description>Yes, I&#039;m running the batch file on each project and then diffing the results to check what it did. Without doing that it probably could be a bit dangerous.

- Roger</description>
		<content:encoded><![CDATA[Yes, I'm running the batch file on each project and then diffing the results to check what it did. Without doing that it probably could be a bit dangerous.

- Roger]]></content:encoded>
	</item>
	<item>
		<title>Comment on ToUnicode - Automating some of the steps of Unicode code conversion (Windows) by Mihai</title>
		<link>http://mihai-nita.net/2007/12/19/tounicode-automating-some-of-the-steps-of-unicode-code-conversion-windows/#comment-961</link>
		<dc:creator>Mihai</dc:creator>
		<pubDate>Thu, 07 Jul 2011 09:36:03 +0000</pubDate>
		<guid isPermaLink="false">http://mihai-nita.net/?p=183#comment-961</guid>
		<description>&lt;p&gt;Thank you.&lt;br /&gt;
I have tried to format your comment a bit.&lt;/p&gt;

&lt;p&gt;Although I have considered recursively scanning for files, I though it is a bit too dangerous :-)&lt;br /&gt;
But your batch might be useful for some (especially since the original file is not lost).&lt;/p&gt;

&lt;p&gt;And if I put an update out at some point I might make -t/-text options case insensitive.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Thank you.<br />
I have tried to format your comment a bit.</p>

<p>Although I have considered recursively scanning for files, I though it is a bit too dangerous <img src='http://mihai-nita.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> <br />
But your batch might be useful for some (especially since the original file is not lost).</p>

<p>And if I put an update out at some point I might make -t/-text options case insensitive.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on ToUnicode - Automating some of the steps of Unicode code conversion (Windows) by Roger Bamforth</title>
		<link>http://mihai-nita.net/2007/12/19/tounicode-automating-some-of-the-steps-of-unicode-code-conversion-windows/#comment-958</link>
		<dc:creator>Roger Bamforth</dc:creator>
		<pubDate>Thu, 07 Jul 2011 07:43:57 +0000</pubDate>
		<guid isPermaLink="false">http://mihai-nita.net/?p=183#comment-958</guid>
		<description>&lt;p&gt;I&#039;m just starting on converting our project to Unicode and am finding ToUnicode very helpful, thanks.&lt;/p&gt;

&lt;p&gt;I&#039;ve just spent the afternoon re-learning all the stuff about batch files that I forgot years ago and thought the results of this might be useful. Here is a batch file that will run ToUnicode.exe on all the .h and .cpp files in a folder and its sub-folders. Any warning messages that are produced are saved in unicode.log.&lt;/p&gt;

&lt;p&gt;By the way, I spent a little while wondering why ToUnicode.exe wasn&#039;t working until I looked at the source code and realised the -T option is case sensitive and -t wouldn&#039;t work. It may be worth mentioning this somewhere.&lt;/p&gt;

&lt;p&gt;Regards&lt;/p&gt;

&lt;p&gt;- Roger&lt;/p&gt;

&lt;blockquote&gt;
&lt;code&gt;
::----------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
:: Converts all the .h and .cpp files in the current folder and all subfolders to a unicode version.&lt;br /&gt;
:: The unicode version of foo.h is called foo.u.h and similarly the unicode version of foo.cpp is called foo.u.cpp.&lt;br /&gt;
:: Any warnings that the conversion program produces can be found in unicode.log&lt;br /&gt;
&lt;br /&gt;
:: See http://www.robvanderwoude.com/ntfor.php for info on using the &quot;for&quot; batch command.&lt;br /&gt;
:: See http://shaunedonohue.blogspot.com/2007/09/every-time-i-need-to-redirect-dos.html for info on redirection, including how to redirect stderr to a file.&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
&lt;br /&gt;
set logfile=&quot;unicode.log&quot;&lt;br /&gt;
&lt;br /&gt;
echo Starting Unicode conversion...&lt;br /&gt;
&lt;br /&gt;
echo ToUnicode warning messages &gt;&gt;%logfile%&lt;br /&gt;
echo -------------------------- &gt;&gt;%logfile%&lt;br /&gt;
echo.                           &gt;&gt;%logfile%&lt;br /&gt;
&lt;br /&gt;
:: The 2&gt;&gt; is redirecting stderr to %logfile% instead of stdout.&lt;br /&gt;
(for /R %%i in (*.h *.cpp) do ToUnicode -T &quot;%%i&quot; &quot;%%~dpni.u%%~xi&quot;) 2&gt;&gt;%logfile%&lt;br /&gt;
&lt;br /&gt;
echo.                        &gt;&gt;%logfile%&lt;br /&gt;
echo ----------------------- &gt;&gt;%logfile%&lt;br /&gt;
echo End of warning messages &gt;&gt;%logfile%&lt;br /&gt;
&lt;br /&gt;
echo ...finished Unicode conversion&lt;br /&gt;
&lt;/code&gt;
&lt;/blockquote&gt;
</description>
		<content:encoded><![CDATA[<p>I'm just starting on converting our project to Unicode and am finding ToUnicode very helpful, thanks.</p>

<p>I've just spent the afternoon re-learning all the stuff about batch files that I forgot years ago and thought the results of this might be useful. Here is a batch file that will run ToUnicode.exe on all the .h and .cpp files in a folder and its sub-folders. Any warning messages that are produced are saved in unicode.log.</p>

<p>By the way, I spent a little while wondering why ToUnicode.exe wasn't working until I looked at the source code and realised the -T option is case sensitive and -t wouldn't work. It may be worth mentioning this somewhere.</p>

<p>Regards</p>

<p>- Roger</p>

<blockquote>
<code>
::----------------------------------------------------<br />
<br />
:: Converts all the .h and .cpp files in the current folder and all subfolders to a unicode version.<br />
:: The unicode version of foo.h is called foo.u.h and similarly the unicode version of foo.cpp is called foo.u.cpp.<br />
:: Any warnings that the conversion program produces can be found in unicode.log<br />
<br />
:: See <a href="http://www.robvanderwoude.com/ntfor.php" rel="nofollow">http://www.robvanderwoude.com/ntfor.php</a> for info on using the "for" batch command.<br />
:: See <a href="http://shaunedonohue.blogspot.com/2007/09/every-time-i-need-to-redirect-dos.html" rel="nofollow">http://shaunedonohue.blogspot.com/2007/09/every-time-i-need-to-redirect-dos.html</a> for info on redirection, including how to redirect stderr to a file.<br />
<br />
@echo off<br />
<br />
set logfile="unicode.log"<br />
<br />
echo Starting Unicode conversion...<br />
<br />
echo ToUnicode warning messages &gt;&gt;%logfile%<br />
echo -------------------------- &gt;&gt;%logfile%<br />
echo.                           &gt;&gt;%logfile%<br />
<br />
:: The 2&gt;&gt; is redirecting stderr to %logfile% instead of stdout.<br />
(for /R %%i in (*.h *.cpp) do ToUnicode -T "%%i" "%%~dpni.u%%~xi") 2&gt;&gt;%logfile%<br />
<br />
echo.                        &gt;&gt;%logfile%<br />
echo ----------------------- &gt;&gt;%logfile%<br />
echo End of warning messages &gt;&gt;%logfile%<br />
<br />
echo ...finished Unicode conversion<br />
</code>
</blockquote>]]></content:encoded>
	</item>
	<item>
		<title>Comment on String API and internationalization by Mihai</title>
		<link>http://mihai-nita.net/2006/04/15/string-api-and-internationalization/#comment-603</link>
		<dc:creator>Mihai</dc:creator>
		<pubDate>Fri, 04 Mar 2011 08:32:18 +0000</pubDate>
		<guid isPermaLink="false">http://mihai-nita.net/?p=115#comment-603</guid>
		<description>That part should be taken care of in the localization process.
Any decent localization tool will check that the placeholders in English also exist in the localized string.
So I am not going to &quot;sneak&quot; this argument back in the discussion :-)
(and it is really nicely covered by Sutter)</description>
		<content:encoded><![CDATA[That part should be taken care of in the localization process.
Any decent localization tool will check that the placeholders in English also exist in the localized string.
So I am not going to "sneak" this argument back in the discussion <img src='http://mihai-nita.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> 
(and it is really nicely covered by Sutter)]]></content:encoded>
	</item>
	<item>
		<title>Comment on String API and internationalization by Joe</title>
		<link>http://mihai-nita.net/2006/04/15/string-api-and-internationalization/#comment-601</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Thu, 03 Mar 2011 15:55:04 +0000</pubDate>
		<guid isPermaLink="false">http://mihai-nita.net/?p=115#comment-601</guid>
		<description>You should&#039;ve included type safety as a criteria for comparison, too. Type safety is extremely important for internationalization, because if your application will crash at random times because the translator messed up the format specifiers in some rare message, that is really not nice.

Type Safety
iostream: good
printf: bad
CString::Format: bad
CString::FormatMessage: bad
boost::format: good
ICU: good</description>
		<content:encoded><![CDATA[You should've included type safety as a criteria for comparison, too. Type safety is extremely important for internationalization, because if your application will crash at random times because the translator messed up the format specifiers in some rare message, that is really not nice.

Type Safety
iostream: good
printf: bad
CString::Format: bad
CString::FormatMessage: bad
boost::format: good
ICU: good]]></content:encoded>
	</item>
	<item>
		<title>Comment on String API and internationalization by Mihai</title>
		<link>http://mihai-nita.net/2006/04/15/string-api-and-internationalization/#comment-594</link>
		<dc:creator>Mihai</dc:creator>
		<pubDate>Tue, 01 Mar 2011 11:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://mihai-nita.net/?p=115#comment-594</guid>
		<description>You are right that by promising that data is contigous (what I have also hinted by saying &quot;members that guarantee a contiguous memory block&quot;) all implementations are prevented from using non-contiguous storage. It just feels bad that this feature is &quot;by mistake&quot; :-)
&lt;br/&gt;&lt;br/&gt;
Thanks for the links to the boost thread. I was not involved, and I will try and catch up.
What pushed me away from boost before was the insistence that the string should be encoding-agnostic.
That is just antiquated, hampers a good implementation and might lead to poor design, with clunky signatures that are there &quot;just in case someone invents something better than Unicode&quot; :-)
&lt;br/&gt;&lt;br/&gt;
In fact, C++0x with u16string and u32string (and might also be nice a u8string) makes an almost official recognition of Unicode, non-format-agnostic string types. A good move, I think. What is missing in top of that would be a set of Unicode-aware methods.
&lt;br/&gt;&lt;br/&gt;
But let&#039;s not start a blog entry in the comments area :-)</description>
		<content:encoded><![CDATA[You are right that by promising that data is contigous (what I have also hinted by saying "members that guarantee a contiguous memory block") all implementations are prevented from using non-contiguous storage. It just feels bad that this feature is "by mistake" <img src='http://mihai-nita.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> 
<br /><br />
Thanks for the links to the boost thread. I was not involved, and I will try and catch up.
What pushed me away from boost before was the insistence that the string should be encoding-agnostic.
That is just antiquated, hampers a good implementation and might lead to poor design, with clunky signatures that are there "just in case someone invents something better than Unicode" <img src='http://mihai-nita.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> 
<br /><br />
In fact, C++0x with u16string and u32string (and might also be nice a u8string) makes an almost official recognition of Unicode, non-format-agnostic string types. A good move, I think. What is missing in top of that would be a set of Unicode-aware methods.
<br /><br />
But let's not start a blog entry in the comments area <img src='http://mihai-nita.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ]]></content:encoded>
	</item>
</channel>
</rss>

