<?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: Find Gremlins With BBEdit</title>
	<atom:link href="http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit/feed" rel="self" type="application/rss+xml" />
	<link>http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit</link>
	<description>Mac &#38; Technology Writings by Daniel Jalkut</description>
	<lastBuildDate>Thu, 16 May 2013 21:58:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: dave e</title>
		<link>http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit/comment-page-1#comment-135975</link>
		<dc:creator>dave e</dc:creator>
		<pubDate>Thu, 28 Feb 2008 07:46:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit#comment-135975</guid>
		<description><![CDATA[this whole thing just bit me in my scripting. I now manually check for these but now that I can automate it makes it even better. 

thanks daniel for the great support !

Dave in Anchorage]]></description>
		<content:encoded><![CDATA[<p>this whole thing just bit me in my scripting. I now manually check for these but now that I can automate it makes it even better. </p>
<p>thanks daniel for the great support !</p>
<p>Dave in Anchorage</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles</title>
		<link>http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit/comment-page-1#comment-135970</link>
		<dc:creator>Charles</dc:creator>
		<pubDate>Wed, 27 Feb 2008 10:11:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit#comment-135970</guid>
		<description><![CDATA[This has bitten me a few times too (more often when creating HTML from TextEdit using docs people have created on Windows). Tex-Edit Plus, the still-going free text editor, has a &quot;cleanup&quot; function which will strip out high ASCII (which these usually are to cause the problem; low ASCII such as CR/LF etc don&#039;t trouble it).

But I&#039;d echo other folk saying that it would be good to have highlighting, at least for high ASCII (red?) and maybe even for low ASCII (green?). Though as you say it might turn out to be one of those functions that only 0% really need, and those who don&#039;t know about it would still send support queries. Unless, hmm, you had such a function turned on by default - people would see the measles spots in their text and wonder what it was.]]></description>
		<content:encoded><![CDATA[<p>This has bitten me a few times too (more often when creating HTML from TextEdit using docs people have created on Windows). Tex-Edit Plus, the still-going free text editor, has a &#8220;cleanup&#8221; function which will strip out high ASCII (which these usually are to cause the problem; low ASCII such as CR/LF etc don&#8217;t trouble it).</p>
<p>But I&#8217;d echo other folk saying that it would be good to have highlighting, at least for high ASCII (red?) and maybe even for low ASCII (green?). Though as you say it might turn out to be one of those functions that only 0% really need, and those who don&#8217;t know about it would still send support queries. Unless, hmm, you had such a function turned on by default &#8211; people would see the measles spots in their text and wonder what it was.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cameron Hayne</title>
		<link>http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit/comment-page-1#comment-135969</link>
		<dc:creator>Cameron Hayne</dc:creator>
		<pubDate>Wed, 27 Feb 2008 08:47:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit#comment-135969</guid>
		<description><![CDATA[In case someone finds it useful, here&#039;s a Perl script that checks for &quot;gremlins&quot; in text files and prints the lines containing them.
(I&#039;m using the PRE and CODE tags around this script in the hope that it might make it more readable - it doesn&#039;t seem to work in the live preview but I&#039;m hoping that is just a bug.)


&lt;code&gt;
#!/usr/bin/perl

# announceGremlins
# This script is intended for checking text files for the presence of gremlins.
# (A &quot;gremlin&quot; is the BBEdit name for an unwanted character, often invisible,
#  that has somehow gotten into your text file.)
# The current implementation of this script looks for characters that
# are not in the POSIX printable character class. 
# You can supply filenames as command-line arguments, or send the text you
# want checked via STDIN.
# Cameron Hayne (macdev@hayne.net)  February 2008

use strict;
use warnings;

while ()
{
    chomp;
    my $line = $_;
    while ($line =~ /[[:^print:]]/g)
    {
        my $colNum = pos($line);  # we want a 1-based column number
        my $before = $`;
        my $after = $&#039;;
        print &quot;Non-printable character at column $colNum of line $. of file $ARGV\n&quot;;
        print &quot;$before?$after\n&quot;;
    }
}
continue
{
    # reset line numbering on each input file
    close ARGV if eof; # Not eof()! (eof with parentheses is different)
}
&lt;/code&gt;
]]></description>
		<content:encoded><![CDATA[<p>In case someone finds it useful, here&#8217;s a Perl script that checks for &#8220;gremlins&#8221; in text files and prints the lines containing them.<br />
(I&#8217;m using the PRE and CODE tags around this script in the hope that it might make it more readable &#8211; it doesn&#8217;t seem to work in the live preview but I&#8217;m hoping that is just a bug.)</p>
<p><code><br />
#!/usr/bin/perl</p>
<p># announceGremlins<br />
# This script is intended for checking text files for the presence of gremlins.<br />
# (A "gremlin" is the BBEdit name for an unwanted character, often invisible,<br />
#  that has somehow gotten into your text file.)<br />
# The current implementation of this script looks for characters that<br />
# are not in the POSIX printable character class.<br />
# You can supply filenames as command-line arguments, or send the text you<br />
# want checked via STDIN.<br />
# Cameron Hayne (macdev@hayne.net)  February 2008</p>
<p>use strict;<br />
use warnings;</p>
<p>while ()<br />
{<br />
    chomp;<br />
    my $line = $_;<br />
    while ($line =~ /[[:^print:]]/g)<br />
    {<br />
        my $colNum = pos($line);  # we want a 1-based column number<br />
        my $before = $`;<br />
        my $after = $';<br />
        print "Non-printable character at column $colNum of line $. of file $ARGV\n";<br />
        print "$before?$after\n";<br />
    }<br />
}<br />
continue<br />
{<br />
    # reset line numbering on each input file<br />
    close ARGV if eof; # Not eof()! (eof with parentheses is different)<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miraz Jordan</title>
		<link>http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit/comment-page-1#comment-135966</link>
		<dc:creator>Miraz Jordan</dc:creator>
		<pubDate>Wed, 27 Feb 2008 00:09:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit#comment-135966</guid>
		<description><![CDATA[I&#039;m one of that 0%. These things just creep in from copy and pasting, or from other sources, by mysterious means.

I have BBEdit and often use Command J to edit posts there before sending to my blog. The red upside down question mark is very handy in BBEdit.

It would be kind of useful to be allowed to display invisible characters in Mars Edit, for those of us who do lots of writing, and editing quotes from others....]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m one of that 0%. These things just creep in from copy and pasting, or from other sources, by mysterious means.</p>
<p>I have BBEdit and often use Command J to edit posts there before sending to my blog. The red upside down question mark is very handy in BBEdit.</p>
<p>It would be kind of useful to be allowed to display invisible characters in Mars Edit, for those of us who do lots of writing, and editing quotes from others&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sairuh</title>
		<link>http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit/comment-page-1#comment-135962</link>
		<dc:creator>sairuh</dc:creator>
		<pubDate>Tue, 26 Feb 2008 18:19:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit#comment-135962</guid>
		<description><![CDATA[I ran into this recently after pasting stuff I had copied from a log file (from Console) into a blog entry. Was I glad to have found a solution in the MarsEdit forum to fix the problem!

Daniel, that&#039;s a great idea to highlight or display warnings where these wacky characters appear in the content.]]></description>
		<content:encoded><![CDATA[<p>I ran into this recently after pasting stuff I had copied from a log file (from Console) into a blog entry. Was I glad to have found a solution in the MarsEdit forum to fix the problem!</p>
<p>Daniel, that&#8217;s a great idea to highlight or display warnings where these wacky characters appear in the content.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit/comment-page-1#comment-135961</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Tue, 26 Feb 2008 17:52:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit#comment-135961</guid>
		<description><![CDATA[Gruber: I&#039;m not 100% sure, but I think the fact that the invisible characters are still legal &quot;ASCII&quot; - they&#039;re a legal part of UTF8.]]></description>
		<content:encoded><![CDATA[<p>Gruber: I&#8217;m not 100% sure, but I think the fact that the invisible characters are still legal &#8220;ASCII&#8221; &#8211; they&#8217;re a legal part of UTF8.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Gruber</title>
		<link>http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit/comment-page-1#comment-135960</link>
		<dc:creator>John Gruber</dc:creator>
		<pubDate>Tue, 26 Feb 2008 17:46:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit#comment-135960</guid>
		<description><![CDATA[The reason these gremlins render the resulting XML invalid (I think) is that they&#039;re *bytes*. Unicode can support any character, but you can&#039;t insert random bytes in the middle of a UTF-8 stream. BBEdit&#039;s Show Invisibles command is useful for spotting these things, too.]]></description>
		<content:encoded><![CDATA[<p>The reason these gremlins render the resulting XML invalid (I think) is that they&#8217;re *bytes*. Unicode can support any character, but you can&#8217;t insert random bytes in the middle of a UTF-8 stream. BBEdit&#8217;s Show Invisibles command is useful for spotting these things, too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit/comment-page-1#comment-135958</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Tue, 26 Feb 2008 16:14:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit#comment-135958</guid>
		<description><![CDATA[Mike: That&#039;s a good question. I suspect they&#039;re never useful, but one of the things I am sensitive to with MarsEdit is not &quot;mucking with&quot; the blogger&#039;s content. So I&#039;d want to be very sure before automatically stripping them out. Currently what I&#039;m thinking is maybe I can just make them show up as very visible red warning icons in the text. Then you&#039;d be able to see it and delete it, but also leave it if it&#039;s for some reason purposeful.

Ölbaum: I don&#039;t think the XML being generated is technically invalid, but  just triggers a problem on the servers it sends to (in this example, WordPress). But that raises a good question: perhaps this should also be reported as a bug to systems that don&#039;t handle such content gracefully.

Daniel]]></description>
		<content:encoded><![CDATA[<p>Mike: That&#8217;s a good question. I suspect they&#8217;re never useful, but one of the things I am sensitive to with MarsEdit is not &#8220;mucking with&#8221; the blogger&#8217;s content. So I&#8217;d want to be very sure before automatically stripping them out. Currently what I&#8217;m thinking is maybe I can just make them show up as very visible red warning icons in the text. Then you&#8217;d be able to see it and delete it, but also leave it if it&#8217;s for some reason purposeful.</p>
<p>Ölbaum: I don&#8217;t think the XML being generated is technically invalid, but  just triggers a problem on the servers it sends to (in this example, WordPress). But that raises a good question: perhaps this should also be reported as a bug to systems that don&#8217;t handle such content gracefully.</p>
<p>Daniel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ölbaum</title>
		<link>http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit/comment-page-1#comment-135956</link>
		<dc:creator>Ölbaum</dc:creator>
		<pubDate>Tue, 26 Feb 2008 09:30:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit#comment-135956</guid>
		<description><![CDATA[I have a hard time understanding how an invisible character can render the XML of the request not well-formed. XML uses Unicode. If the &#039;gremlin&#039; comes from the body of the post, then it should not be a problem. The only way I could see a problem is if they appear in the XML tags, which should not happen as the tags of the request are generated by MarsEdit and not directly from user input.]]></description>
		<content:encoded><![CDATA[<p>I have a hard time understanding how an invisible character can render the XML of the request not well-formed. XML uses Unicode. If the &#8216;gremlin&#8217; comes from the body of the post, then it should not be a problem. The only way I could see a problem is if they appear in the XML tags, which should not happen as the tags of the request are generated by MarsEdit and not directly from user input.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian Grey</title>
		<link>http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit/comment-page-1#comment-135955</link>
		<dc:creator>Julian Grey</dc:creator>
		<pubDate>Tue, 26 Feb 2008 08:48:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/473/find-gremlins-with-bbedit#comment-135955</guid>
		<description><![CDATA[I usually end up with these when cutting and pasting text from a web page open in Safari to BBedit, the funny thing is that it never happens when cutting from Firefox.

Hmm but I have never ended up &quot;keyboarding&quot; them in. I would be nice to figure out where they come from.]]></description>
		<content:encoded><![CDATA[<p>I usually end up with these when cutting and pasting text from a web page open in Safari to BBedit, the funny thing is that it never happens when cutting from Firefox.</p>
<p>Hmm but I have never ended up &#8220;keyboarding&#8221; them in. I would be nice to figure out where they come from.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

 Served from: www.red-sweater.com @ 2013-05-18 21:55:11 by W3 Total Cache -->