<?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 on: Clean/Strip/Remove Binary Characters from C# String</title>
	<atom:link href="http://www.csharp411.com/cleanstripremove-binary-characters-from-c-string/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.csharp411.com/cleanstripremove-binary-characters-from-c-string/</link>
	<description>C# Development</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:14:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Adam</title>
		<link>http://www.csharp411.com/cleanstripremove-binary-characters-from-c-string/#comment-946</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Fri, 03 Jul 2009 23:12:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/cleanstripremove-binary-characters-from-c-string/#comment-946</guid>
		<description>this is really useful, thx</description>
		<content:encoded><![CDATA[<p>this is really useful, thx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nido</title>
		<link>http://www.csharp411.com/cleanstripremove-binary-characters-from-c-string/#comment-945</link>
		<dc:creator>nido</dc:creator>
		<pubDate>Tue, 16 Jun 2009 13:01:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/cleanstripremove-binary-characters-from-c-string/#comment-945</guid>
		<description>I have solved my problem with adding two line of code

The new funciton will be...
static public string CleanString(string s)
        {
            if (s != null &amp;&amp; s.Length &gt; 0)
            {
                StringBuilder sb = new StringBuilder(s.Length);
                foreach (char c in s)
                {
                    //sb.Append(Char.IsControl(c) ? &#039; &#039; : c);
                    if(Char.IsSymbol(c))
                    {
                        continue;
                    }
                    sb.Append(Char.IsLetterOrDigit(c) ? c : &#039; &#039;);

                }
                s = sb.ToString();
            }
            return s;
        }


Thanks for sharing such nice function</description>
		<content:encoded><![CDATA[<p>I have solved my problem with adding two line of code</p>
<p>The new funciton will be&#8230;<br />
static public string CleanString(string s)<br />
        {<br />
            if (s != null &amp;&amp; s.Length &gt; 0)<br />
            {<br />
                StringBuilder sb = new StringBuilder(s.Length);<br />
                foreach (char c in s)<br />
                {<br />
                    //sb.Append(Char.IsControl(c) ? &#8216; &#8216; : c);<br />
                    if(Char.IsSymbol(c))<br />
                    {<br />
                        continue;<br />
                    }<br />
                    sb.Append(Char.IsLetterOrDigit(c) ? c : &#8216; &#8216;);</p>
<p>                }<br />
                s = sb.ToString();<br />
            }<br />
            return s;<br />
        }</p>
<p>Thanks for sharing such nice function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: timm</title>
		<link>http://www.csharp411.com/cleanstripremove-binary-characters-from-c-string/#comment-944</link>
		<dc:creator>timm</dc:creator>
		<pubDate>Tue, 16 Jun 2009 12:39:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/cleanstripremove-binary-characters-from-c-string/#comment-944</guid>
		<description>Nido, see this webpage for the list of &quot;control&quot; characters that are removed:

http://msdn.microsoft.com/en-us/library/18zw7440.aspx

As I mentioned in the article, the sample code does not remove high ASCII or UNICODE characters which may appear as binary.  Run the sample code on your data, and see what binary characters still remain.  Then add a check to the loop to remove those characters as well.</description>
		<content:encoded><![CDATA[<p>Nido, see this webpage for the list of &#8220;control&#8221; characters that are removed:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/18zw7440.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/18zw7440.aspx</a></p>
<p>As I mentioned in the article, the sample code does not remove high ASCII or UNICODE characters which may appear as binary.  Run the sample code on your data, and see what binary characters still remain.  Then add a check to the loop to remove those characters as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nido</title>
		<link>http://www.csharp411.com/cleanstripremove-binary-characters-from-c-string/#comment-943</link>
		<dc:creator>nido</dc:creator>
		<pubDate>Tue, 16 Jun 2009 12:13:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.csharp411.com/cleanstripremove-binary-characters-from-c-string/#comment-943</guid>
		<description>I test this function but not working.
many binary correcter still there.</description>
		<content:encoded><![CDATA[<p>I test this function but not working.<br />
many binary correcter still there.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

