<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Whaly&#039;s World &#187; diacritics</title>
	<atom:link href="http://baleinoid.com/whaly/tag/diacritics/feed/" rel="self" type="application/rss+xml" />
	<link>http://baleinoid.com/whaly</link>
	<description>tail -f /var/log/whaly</description>
	<lastBuildDate>Thu, 08 Sep 2011 10:23:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to remove Diacritics in .net C#</title>
		<link>http://baleinoid.com/whaly/2010/01/how-to-remove-diacritics-in-net-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-remove-diacritics-in-net-c</link>
		<comments>http://baleinoid.com/whaly/2010/01/how-to-remove-diacritics-in-net-c/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 18:36:13 +0000</pubDate>
		<dc:creator>whaly</dc:creator>
				<category><![CDATA[Microsoft .NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[diacritics]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://baleinoid.com/whaly/?p=145</guid>
		<description><![CDATA[If you need to remove diacritics from a string you can : [Bad] do a lot's of replace like repeat for ÀÁÂÃÄâãäàáÈÉÊËêëèéÌÍÎÏîïìíÒÓÔÖôõöòóÙÚÛÜûüùúÝýÑñç and maybe miss some exotic chars or the Õ in this list ! [Good] or you can use this function]]></description>
			<content:encoded><![CDATA[<p>If you need to remove diacritics from a string you can :</p>
<ul>
<li>[Bad] do a lot's of replace like <img src='http://baleinoid.com/whaly/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </li>
</ul>
<pre class="brush: csharp; light: true; title: ; notranslate">inputString = inputString.Replace('À', 'A');</pre>
<p>repeat for ÀÁÂÃÄâãäàáÈÉÊËêëèéÌÍÎÏîïìíÒÓÔÖôõöòóÙÚÛÜûüùúÝýÑñç and maybe miss some exotic chars or the Õ in this list !</p>
<ul>
<li>[Good] or you can use this function <img src='http://baleinoid.com/whaly/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<pre class="brush: csharp; light: true; title: ; notranslate">
	public static string RemoveDiacritics(string inputString)
	{
		//!\\ Warning 'œ' will be replaced with a 'o' not an 'oe'
		String normalizedString = inputString.Normalize(NormalizationForm.FormD);
		StringBuilder stringBuilder = new StringBuilder();
		for (int i = 0; i &lt; normalizedString.Length; i++)
		{
			Char c = normalizedString[i];
			if (System.Globalization.CharUnicodeInfo.GetUnicodeCategory(c) != System.Globalization.UnicodeCategory.NonSpacingMark)
				stringBuilder.Append(c);
		}
		return stringBuilder.ToString();
	}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://baleinoid.com/whaly/2010/01/how-to-remove-diacritics-in-net-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: baleinoid.com @ 2012-02-06 04:19:09 -->
