<?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>Ben McGraw's Egometry &#187; Gruedorf</title>
	<atom:link href="http://www.egometry.com/categories/gruedorf/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.egometry.com</link>
	<description>cogito ergo stfu</description>
	<lastBuildDate>Wed, 28 Jul 2010 20:12:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Experiments in rendering a Tiled Map in javascript/html&#8230;</title>
		<link>http://www.egometry.com/gruedorf/experiments-in-rendering-a-tiled-map-in-javascripthtml/</link>
		<comments>http://www.egometry.com/gruedorf/experiments-in-rendering-a-tiled-map-in-javascripthtml/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 09:53:38 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=936</guid>
		<description><![CDATA[Sophia&#8217;s first tiles!Embrace the pixels! Sophia has been chomping at the bit to make more games. Since it&#8217;s been going on two years since I last flexed my gamemaking muscles fully, and since I rather adore Sophia, I&#8217;ve been chasing this rainbow. I&#8217;ve been ever more intrigued by the idea of a pure html/javascript game [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; padding: 4px; margin: 4px;">
<p><a title="Sophia Game mk1." rel="lightbox[pics936]" href="http://www.egometry.com/i/2010/07/SophiaGame.png"><img class="attachment wp-att-937 alignleft" src="http://www.egometry.com/i/2010/07/SophiaGame.thumbnail.png" alt="Sophia Game mk1." width="192" height="200" /></a></p>
<p>	<span style="color: silver; font-size: -1;"><br />
<br />Sophia&#8217;s first tiles!<br />Embrace the pixels!</span></div>
<p>Sophia has been chomping at the bit to make more games.  Since it&#8217;s been going on <a href="http://www.egometry.com/gruedorf/the-magical-meaning-of-m/">two years since I last flexed my gamemaking muscles fully</a>, and since I rather adore Sophia, I&#8217;ve been chasing this rainbow.</p>
<p>I&#8217;ve been ever more intrigued by the idea of a pure html/javascript game engine of late, and have started taking existing, established tools (like mapeditor.org&#8217;s tiled) and putting them into the browser.</p>
<p><a href="http://www.egometry.com/files/gruedorf_challenge/070/" target=_new>Here&#8217;s the result: (currently firefox-only)</a>. To fully get the pleasure, inspect elements on this example in firebug.</p>
<p>The idea is simple: html/js has affordances baked-in to parse xml documents.  This can handle traditional map data.  css sprite-sheet techniques have been used for years now, which directly mimic old tilset/vsp-style assets.  Combine the two&#8230; and you have a effen map.  Throw in browser optimizations for visible/hidden elements, and we should have a relatively cheap rendering method.</p>
<p>The above test is fairly simple: one 30&#215;30 map, one layer.  It loads instantaneously fast.  It&#8217;s tiles are a single gif sized 304&#215;144.  Fairly economical.  I decided to shove each of these boys into a div for now and use the background-image css spriting technique to get a &#8220;purist&#8221; tiling implementation going.</p>
<p>I opted against using canvas for now because I wanted to see how far I could get without it.  So far so good, but I&#8217;ve not yet really stressed the system.  The next jump will be to take some of my epic 6-layer maps from SotS, translate them into xml, and see how they fair in the browser.</p>
<p>Of the code I wrote, I suppose the &#8220;sauce&#8221; was a fairly common offset calculation.  Although this sort of endeavor may not be so common in the modern age, it&#8217;s pretty commonplace to those of us who labored in 320&#215;240 back in DOS.  Get off my lawn.</p>
<pre>
var tileset = {
    tileWidth: 16,
    tileHeight: 16,
    setWidth: 304,
    setHeight: 144,

    getCoordsfromIdx : function( idx ) {
        var idx = parseInt(idx);
        idx--; //tmx is 1-based, not 0-based.  We need to sub 1 to get to a proper mapping.
        //idx--;

        var perRow = this.setWidth / this.tileWidth;

        var x = idx % perRow;
        var y = (idx / perRow);

        return [
            -(parseInt(x)*parseInt(this.tileWidth)),
            -(parseInt(y)*parseInt(this.tileHeight))
        ];
    }
}
</pre>
<p>This is converting a single tile index into two coordinates for the renderer to consume.  For instance, if you want tile 2, it takes a &#8217;2&#8242; at the top, does some maths, and tells you that tile 2&#8242;s offset is 16 pixels in from the top-left corner, and 0 pixels down (ie, on the top row).  Some strange quirks of this code: I had to decrement the idx, because Tiled&#8217;s xml format is 1-based, not 0 (ie, the first tile, the one at (0,0), is index 1, not index 0); and I negate the two numbers I return because the consumer of these coordinates is a css background-position style, and that&#8217;s how they work.</p>
<p>Also of note was a small hiccup when I uploaded this to my server.  My sandbox had no trouble serving a .tmx file as Content-Type: text/xml, but my big-boy server threw a conniption about it.  I didn&#8217;t realize that was a problem until I threw some debugger statements into the code that &#8220;should&#8217;ve just worked&#8221; and found that all of the proper stuff was in the responseText attribute, but responseXML was null.  So I renamed the mapfile to .xml on the server and everything worked fine.</p>
<p>I guess next step, before trying to stress the system with a super macho map, is to figure out why this isn&#8217;t working in Safari/Chrome/IE/Opera/Whatever&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/experiments-in-rendering-a-tiled-map-in-javascripthtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Verge Files Directory</title>
		<link>http://www.egometry.com/gruedorf/verge-files-directory/</link>
		<comments>http://www.egometry.com/gruedorf/verge-files-directory/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 08:53:06 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=934</guid>
		<description><![CDATA[If all went well, this will only show up on my gruedorf feed and not on the main site rss feed. Yesterday, I got the file directory view completed for beta.verge-rpg.com. See it at http://beta.verge-rpg.com/downloads/directory/. Next up will be the file redirects! Whee. Hey Kildorf, where&#8217;s your post?]]></description>
			<content:encoded><![CDATA[<p>If all went well, this will only show up on my gruedorf feed and not on the main site rss feed.</p>
<p>Yesterday, I got the file directory view completed for beta.verge-rpg.com.  See it at <a href=http://beta.verge-rpg.com/downloads/directory/>http://beta.verge-rpg.com/downloads/directory/</a>.</p>
<p>Next up will be the file redirects!  Whee.</p>
<p>Hey Kildorf, where&#8217;s your post?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/verge-files-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gruedorf: Sandbox Sitta</title>
		<link>http://www.egometry.com/gruedorf/gruedorf-sandbox-sitta/</link>
		<comments>http://www.egometry.com/gruedorf/gruedorf-sandbox-sitta/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 06:57:52 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[verge-rpg]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=931</guid>
		<description><![CDATA[This week I completed the autoschema tool that&#8217;s been long overdue to maintain a healthy database state across the four sandboxes used for development. I also cleaned up layout errors and corrected a bug in screenshot uploading. Also improved the search result page. Three minor files section tasks left: A directory link/listing, build the legacy [...]]]></description>
			<content:encoded><![CDATA[<p>This week I completed the autoschema tool that&#8217;s been long overdue to maintain a healthy database state across the four sandboxes used for development.</p>
<p>I also cleaned up layout errors and corrected a bug in screenshot uploading.  Also improved the search result page.</p>
<p>Three minor files section tasks left: A directory link/listing, build the legacy 301 redirect table, and give the files frontpage some polish.</p>
<p>Next major task after that: the Gallery Controller.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/gruedorf-sandbox-sitta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Files, and the editing thereof.</title>
		<link>http://www.egometry.com/gruedorf/files-and-the-editing-thereof/</link>
		<comments>http://www.egometry.com/gruedorf/files-and-the-editing-thereof/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 07:26:38 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=905</guid>
		<description><![CDATA[The most pedestrian screenshot ever. To what depths has this once-mighty work-journal fallen? My gruedorf showings are shameful of late, and so are all of yours. The only one holding the line at this moment is Ustor. Perhaps this should be called &#8220;UstorUstor&#8221;. Or &#8220;TorUs&#8221;. At any rate, my small token to personal projects this [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 200px; margin: 10px;"><a href="http://www.egometry.com/i/2009/09/2009-09-22.jpg" rel="lightbox[pics905]" title="A screenshot of a control panel page.  Woo?"><img src="http://www.egometry.com/i/2009/09/2009-09-22.thumbnail.jpg" alt="2009-09-22" width="169" height="200" class="attachment wp-att-906 alignleft" /></a>
<p class="wp-caption-text" style="color: silver;">The most pedestrian screenshot ever.  To what depths has this once-mighty work-journal fallen?</p>
</div>
<p>My <a href=http://www.johnweng.com/gruedorf/>gruedorf</a> showings are shameful of late, and so are all of yours.  The only one holding the line at this moment is Ustor.  Perhaps this should be called &#8220;UstorUstor&#8221;.  Or &#8220;TorUs&#8221;.</p>
<p>At any rate, my small token to personal projects this week is the file management section&#8217;s edit page.  Woo, now you can edit your files once they exist.  Necessary, and very quotidian to a web developer.</p>
<p>Up next on this mystical journey is the upload section&#8217;s frontpage, featuring most downloaded recently, newest files, and staff picks (aka, <a href=http://verge-rpg.com/demoalarm/>Demo Alarms</a>).  After that, we&#8217;re a docs section from release.  At this point, I think I should screen-scrape my old site&#8217;s documentation and import all of that into a wiki.  Anyone have objections?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/files-and-the-editing-thereof/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vrpg beta work continues&#8230;</title>
		<link>http://www.egometry.com/gruedorf/vrpg-beta-work-continues/</link>
		<comments>http://www.egometry.com/gruedorf/vrpg-beta-work-continues/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 20:59:13 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[vrpg]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=902</guid>
		<description><![CDATA[I&#8217;ve mainly been dealing with code concerning the files section.  I&#8217;ve improved the quality of the upload process, corrected the file lineage graph and made strides towards a saner system, have made it so you can comment upon file entries, and made it so anyone can upload screenshots of any file. Also I made an [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve mainly been dealing with code concerning the files section.  I&#8217;ve improved the quality of the upload process, corrected the file lineage graph and made strides towards a saner system, have made it so you can comment upon file entries, and made it so anyone can upload screenshots of any file.</p>
<p>Also I made an schema-application tool to keep track of which .sql files have been applied in what environment.  Trust me, this is useful.</p>
<p>So where did I go for two months, far, far away from Gruedorf?  I honestly can say I was shocked to crack open this dev folder to find the last svn log from <em>July 10</em>.  So wherever I went, it didn&#8217;t seem as long as it was. :(</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/vrpg-beta-work-continues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gruedorf: the Swampening</title>
		<link>http://www.egometry.com/gruedorf/gruedorf-the-swampening/</link>
		<comments>http://www.egometry.com/gruedorf/gruedorf-the-swampening/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 20:49:23 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[verge-rpg]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=894</guid>
		<description><![CDATA[Between putting in incredible hours at work, and a few Magic: the Gathering pre-release events in the last week, I haven&#8217;t had much time for gruedorfing. However, I still got 14 commits in.  (All of them Friday morning.) The work done was all in finalizing the /downloads/complete-new-os/ page, and tracking down and fixing errors that [...]]]></description>
			<content:encoded><![CDATA[<p>Between putting in incredible hours at work, and a few Magic: the Gathering pre-release events in the last week, I haven&#8217;t had much time for gruedorfing.</p>
<p>However, I still got 14 commits in.  (All of them Friday morning.)</p>
<p>The work done was all in finalizing the /downloads/complete-new-os/ page, and tracking down and fixing errors that had cropped up in the upload process.</p>
<p>The second item distresses me, presently, since a solid upload system was the main impetus for the rewrite.  finding out that uploads are still fragile and very prone to breaking with forward development, combined with the fact that I don&#8217;t have a testing strategy for roundtrip uploads, means I&#8217;m kinda nervous.</p>
<p>So, anyone out there have a good solution for a round-trip integration test where you upload, via flash and javascript, a unique file, and then verify that the file exists on a unix filesystem, and then verify that a corresponding database entry and further corresponding webpage works?</p>
<p>Moving forward, I&#8217;ll be working on an administrative page to allow file owners/admins to associate file instances as older/newer versions of the same file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/gruedorf-the-swampening/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uploads, Downloads, and the Management Thereof.</title>
		<link>http://www.egometry.com/gruedorf/uploads-downloads-and-the-management-thereof/</link>
		<comments>http://www.egometry.com/gruedorf/uploads-downloads-and-the-management-thereof/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 16:35:45 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[Gruedorf Competitors]]></category>
		<category><![CDATA[verge]]></category>
		<category><![CDATA[verge-rpg]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=890</guid>
		<description><![CDATA[After some prodding, I managed to get the dorf back into gruedorf. Let the games resume. Since last I posted about beta.vrpg, 58 revisions have occurred. In that time: I got file submissions up. I got (simple, title-based) file searches up. I got most of the file details page up (thread spawning, screenshot uploading pending). [...]]]></description>
			<content:encoded><![CDATA[<p>After some prodding, I managed to get the <a href="http://www.gearleaf.com/node/39" target=_blank>dorf</a> back into <a href=http://www.johnweng.com/gruedorf/ target=_blank>gruedorf</a>.  Let the games resume.</p>
<p>Since last I posted about <a href=http://beta.verge-rpg.com/ target=_blank>beta.vrpg</a>, 58 revisions have occurred.  In that time:</p>
<ul>
<li>I got file submissions up.</li>
<li>I got (simple, title-based) file searches up.</li>
<li>I got most of the file details page up (thread spawning, screenshot uploading pending).</li>
<li>I did a <i>lot</i> of database reworking and massaging, mainly to get to a point where&#8230;</li>
<li>&#8230;single file entries can have multiple physical files attached, so one game can have file links to every OS it&#8217;s released on</li>
</ul>
<p>Oh, and I made a <a rel="nofollow" href=http://beta.verge-rpg.com/simulated-bad-error target=_blank>Silly 500 Internal Service Error page</a>.</p>
<p>Definitely the most important part of this work.</p>
<p>Going forward will be finishing the file management side of things (letting you deprecate old versions of files in favor of new ones, showing a browsable history, letting you edit and delete files you own), and cranking out the community-based side of things (ie, image uploading and talkback threads on file pages.)  After that, advanced search options and a browsable file index, and the section should be complete.</p>
<p>I&#8217;m mainly excited to see a upload system that hasn&#8217;t seen a failure yet.  This was one of the major failures of the current vrpg that prompted the rewrite.  I used <a target=_blank href=http://www.swfupload.org/>swfupload</a> for the actual UI/handling of the upload, and integrating it went very smoothly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/uploads-downloads-and-the-management-thereof/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple scripts always ship.</title>
		<link>http://www.egometry.com/gruedorf/simple-scripts-always-ship/</link>
		<comments>http://www.egometry.com/gruedorf/simple-scripts-always-ship/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 11:03:26 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[escaping strings]]></category>
		<category><![CDATA[jokesfornerds]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[strings]]></category>
		<category><![CDATA[webapps]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=862</guid>
		<description><![CDATA[Simple needs, simple deeds. A need for a simple one-off occurred Monday evening at work. Some non-engineer coworkers needed to be shown how to make some non-Latin-1 text into html entities. Basically, they needed a 5 line php script. Right before sending them to any number of sites that already do this 5-line operation, I [...]]]></description>
			<content:encoded><![CDATA[<h2>Simple needs, simple deeds.</h2>
<p>A need for a simple one-off occurred Monday evening at work.  Some non-engineer coworkers needed to be shown how to make some non-<a href="http://en.wikipedia.org/wiki/ISO_8859-1" target=_blank>Latin-1</a> text into html entities.  </p>
<p>Basically, they needed a 5 line php script.</p>
<p>Right before sending them to <a href="http://www.google.com/search?q=html+entity+converter" target=_blank>any number of sites that already do this 5-line operation</a>, I decide: <i>what the hell, I&#8217;ll just make one of my own</i>.  And so, that night after unwinding, <a href="http://www.egometry.com/html-entitizer/" target=_blank>I did</a>.</p>
<p>Here&#8217;s my <a href="http://www.egometry.com/html-entitizer/" target=_blank>HTML Entitizer</a>.  Suitable for all your HTML entitizing needs, large <i>or</i> small!</p>
<h2>PHP in <u>Escape from &amp;#76;&amp;#46;&amp;#65;&amp;#46;</u><a href="http://www.zefrank.com/thewiki/the_show:_05-10-06" target=_blank style="font-size:40%; color: #eee;">(jokesfornerds)</a></h2>
<p>One of the reasons PHP is so popular is the fact that it&#8217;s got so many handy little functions.  In this case, <a href="http://php.net/manual/en/function.htmlentities.php">htmlentities()</a> is the blade of PHP&#8217;s swiss army knife that we&#8217;re using.  Of course, indiscriminate use of functions like this cause problems like double-escaped characters (&amp;amp;amp;) showing up in databases. </p>
<p><a href="http://www.egometry.com/i/2009/07/swiss-army-everything.jpg" rel="lightbox[pics862]" title="PHP, the swiss-army knife."><img src="http://www.egometry.com/i/2009/07/swiss-army-everything.thumbnail.jpg" alt="PHP, the swiss-army knife." width="200" height="152" class="attachment wp-att-864 alignright" /></a>PHP&#8217;s solution to this sort of thing is generally to throw new corkscrews and toothpicks onto it&#8217;s ever-growing pile of tools on it&#8217;s knife.  If you look at the <a href="http://php.net/manual/en/function.htmlentities.php">documentation page for htmlentities()</a>, you can see that as of version 5.2.3 of PHP, another optional parameter was added: double_encode. Which will</p>
<p>Getting the right escape order can be hard, especially for novices or small teams inheriting code from other small teams.  To date I don&#8217;t think I&#8217;ve inherited work on a webapp whose database wasn&#8217;t littered with extraneous &amp;amp;&#8217;s and rogue \\&#8217;s. It&#8217;s only by virtue of verge-rpg.com having a single developer who is really, <i>really</i> annoyed by this problem the the point of neuroticism that &amp;amp;amp; never appears in the database except in <a href="http://verge-rpg.com/boards/display_thread.php?id=131844#post131851" target=_blank>posts that actually wanted to display &amp;amp;</a>.</p>
<p>Although even this level of OCD-database-cleansing didn&#8217;t prevent <a href="http://verge-rpg.com/boards/display_thread.php?id=131844#post131850" target=_blank>escaping-related errors on the first go-round</a>.</p>
<h2>Teh (sic) Implementation.</h2>
<p>So, the only time-consuming part of getting this script into my wordpress site (other than me taking a bloody half hour to blog about a 2-minute job) was convincing wordpress that it should allow <span style="color: red;">&lt;?php</span> fragments into my posts.</p>
<p>Luckily, other people before me have wanted this very thing.  WordPress&#8217;s biggest strength is again one of PHP&#8217;s: if you want it, it&#8217;s already been made for you.  In this case the <a href="http://bluesome.net/post/2005/08/18/50/%20Exec-PHP" target=_blank>Exec-PHP</a> module will let admin-level users of your blog post for-reals, actual PHP into your posts!  You&#8217;d better hope your admins don&#8217;t have their accounts compromised! <span style="font-size:40%; color: #eee;">(&#8230;one moment.  Changing my password.)</span></p>
<p>In PHP&#8217;s case, the code that you want that&#8217; already been written for you is <a href="http://www.php.net/manual/en/function.htmlentities.php#84612">in every single function&#8217;s talkback thread</a>.  These functions may not be hyper-optimized or the best solution for any given problem, but they generally are what you want to prove a point.  You scan the docs, you grab the code, you put it in your site, and you move on to the next problem in your own app.</p>
<p>Quick and dirty, the way PHP likes it.</p>
<p>For the curious, here&#8217;s the solution I spat out (copy included):</p>
<pre style="background-color: #ddd; padding: 10px; line-height: 110%;">
&lt;h1&gt;Escape html&lt;/h1&gt;
&lt;p&gt;This is a simple script to give the escaped codes for some html. Useful
for making foreign languages play nice with html, regardless of how the
server handles string encoding.&lt;/p&gt;
&lt;?
if( isset($_POST['escape_me']) ) {
echo('&lt;h2&gt;Your escaped html&lt;/h2&gt;&lt;div'.
     'style="background-color: #ddd; padding: 8px;"&gt;');
echo(str_replace('&amp;','&amp;amp;',htmlentities(stripslashes($_POST['escape_me']),
     ENT_NOQUOTES,'UTF-8')));
echo( '&lt;/div&gt;' );
}
?&gt;
&lt;form action='/html-entitizer/' method='POST'&gt;
Text to escape:
&lt;textarea name='escape_me' style='width: 550px; height: 200px;'&gt;&lt;/textarea&gt;
&lt;input type='submit' value='Create my html entities'&gt;
&lt;/form&gt;
</pre>
<p>(weird formatting so it doesn&#8217;t run off the side of the screen; I don&#8217;t actually code like that.  Mostly. ;)</p>
<h2>Coda</h2>
<p>It is of note that this <i>tiny</i> amount of effort got me two really sincere &#8220;thank yous&#8221; from the non-engineers.  It&#8217;s important to note that things that are mindlessly trivial to a programmer can be tedious tasks to someone without the power to bully the computer into doing labor for them.  One of the guys, a computer saavy guy who had access to lists of what each escaped character translated to, insisted that he&#8217;d just search/replace the offensive characters by hand.  </p>
<p>Ostensibly, this was offered to save me work.</p>
<p>How much time did my 2 minutes of code save him?</p>
<p>(<a href="http://www.google.com/search?q=html+entity+converter" target=_blank>Don&#8217;t forget a google for &#8220;html entity converter&#8221; would&#8217;ve saved even that, had I cared to not make the tiny toy script of my own</a>.  I&#8217;ll ramble on about re-using other people&#8217;s work more later, but it&#8217;s key to remember even what little work I did end up doing was extraneous and largely an exercise in vanity.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/simple-scripts-always-ship/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>beta is the new gamma</title>
		<link>http://www.egometry.com/gruedorf/beta-is-the-new-gamma/</link>
		<comments>http://www.egometry.com/gruedorf/beta-is-the-new-gamma/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 12:38:44 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[verge-rpg]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=853</guid>
		<description><![CDATA[Work continues apace on beta.verge-rpg.com. Actually, it&#8217;s quite brisk now. Almost 60 revisions have passed in the last week. Gayo and crew have banged on the forums, and I patched several oversights. Locally I&#8217;ve moved on to the new downloads section, which I&#8217;m looking forward greatly to finishing. Mainly so there can be an upload [...]]]></description>
			<content:encoded><![CDATA[<p>Work continues apace on beta.verge-rpg.com.</p>
<p>Actually, it&#8217;s quite brisk now.  Almost 60 revisions have passed in the last week.</p>
<p>Gayo and crew have banged on the forums, and I patched several oversights.  Locally I&#8217;ve moved on to the new downloads section, which I&#8217;m looking forward greatly to finishing.  Mainly so there can be an upload script that works for most users and gives progress feedback.</p>
<p>Are all webapps 98% mundane crap?  I&#8217;ve been doing them for almost a decade now, and I think I have an answer.</p>
<p>(The answer is &#8220;yes&#8221;.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/beta-is-the-new-gamma/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gruedorf: boards done.</title>
		<link>http://www.egometry.com/gruedorf/gruedorf-boards-done/</link>
		<comments>http://www.egometry.com/gruedorf/gruedorf-boards-done/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 05:45:29 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[verge-rpg]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=846</guid>
		<description><![CDATA[Even though I&#8217;ve been lax in posting, I&#8217;ve been working (when I can) on finishing the beta.verge-rpg.com boards. As of revision 237, the section is good to go for this run-through.  I&#8217;m going to now move on to the file section]]></description>
			<content:encoded><![CDATA[<p>Even though I&#8217;ve been lax in posting, I&#8217;ve been working (when I can) on finishing the <a href="http://beta.verge-rpg.com">beta.verge-rpg.com boards</a>.</p>
<p>As of revision 237, the section is good to go for this run-through.  I&#8217;m going to now move on to the file section</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/gruedorf-boards-done/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
