<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en"><title type="text">Het Bijstere Spoor</title><link rel="alternate" type="text/html" href="http://www.rooftopsolutions.nl/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/bijsterespoor" /><subtitle type="html">Latest headlines for Het Bijstere Spoor</subtitle><updated>1970-01-01T00:00:00+00:00</updated><generator>SabreTooth5 (Feed generator library 0.2). http://www.rooftopsolutions.nl</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/bijsterespoor" /><feedburner:info uri="bijsterespoor" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>43.636417</geo:lat><geo:long>-79.424651</geo:long><link rel="license" type="text/html" href="http://creativecommons.org/licenses/by-sa/2.5/" /><logo>http://creativecommons.org/images/public/somerights20.gif</logo><entry><title type="text">SabreDAV 1.0.9 released &amp; CalDAV news</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bijsterespoor/~3/r7IgrXA0VFY/270" /><author><name>Evert Pot</name><email>evert@rooftopsolutions.nl</email></author><updated>2010-03-19T00:18:36-07:00</updated><id>http://www.rooftopsolutions.nl/article/270</id><content type="html">&lt;p style="float: left; padding: 0 5px 0 5px"&gt;&lt;a href="http://code.google.com/p/sabredav/"&gt;&lt;img src="http://sabredav.org/img/sabredav_logo1.png" alt="SabreDAV logo" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The last SabreDAV announcement I made here was 1.0.4, which happened in January. Just today I've released 1.0.9, so I figured it's time for a small update.&lt;/p&gt;

&lt;h3&gt;A public demo site&lt;/h3&gt;

&lt;p&gt;I've bought the sabredav.org domain, and placed a live demo on it for people to try out. Give it a shot:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;url &lt;a href="http://demo.sabredav.org/"&gt;demo.sabredav.org&lt;/a&gt;.&lt;/p&gt;
  &lt;li&gt;username: testuser&lt;/li&gt;
  &lt;li&gt;password: test&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please note that OS/X Finder will not be able to upload files here, because it uses the Chunked Transfer Encoding, which is not supported by sourceforge's webserver &lt;a href="http://nginx.org/"&gt;Nginx&lt;/a&gt;. Read more &lt;a href="http://www.rooftopsolutions.nl/article/260"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Bugfixes&lt;/h3&gt;

&lt;p&gt;There's been a number of small(ish) bugfixes.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Fixed fatal error when a malformed url was called.&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://code.google.com/p/sabredav/issues/detail?id=19"&gt;Issue 19&lt;/a&gt;: Better responses to HEAD requests on collections, improving compatibility with MS Office.&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://code.google.com/p/sabredav/issues/detail?id=23"&gt;Issue 23&lt;/a&gt;: Fixed Allow header, improving compatibility with Evolution.&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://code.google.com/p/sabredav/issues/detail?id=21"&gt;Issue 21&lt;/a&gt;: Typo.&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://code.google.com/p/sabredav/issues/detail?id=27"&gt;Issue 27&lt;/a&gt;: Incorrect encoding of entities in properties.&lt;/li&gt;
  &lt;li&gt;&lt;a href="http://code.google.com/p/sabredav/issues/detail?id=29"&gt;Issue 29&lt;/a&gt;: Missing constant causing fatal error on lock requests with infinite timeouts.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So there it is. You can download the latest version on &lt;a href="http://code.google.com/p/sabredav/downloads/"&gt;the googlecode project page&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;CalDAV&lt;/h3&gt;

&lt;p&gt;CalDAV support is going well. Currently iCal, Evolution and Lightning/Sunbird are supported. If you want to test it out, be sure to download the &lt;a href="http://code.google.com/p/sabredav/downloads/list"&gt;alpha version (1.1.x)&lt;/a&gt;, and &lt;a href="http://code.google.com/p/sabredav/wiki/CalDAV"&gt;read the related documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;IRC&lt;/h3&gt;

&lt;p&gt;I've also setup an irc channel on freenode.net. If you feel like idling somewhere new, head over to &lt;a href="irc://freenode.net/#sabredav"&gt;#sabredav&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/bijsterespoor/~4/r7IgrXA0VFY" height="1" width="1"/&gt;</content><feedburner:origLink>http://www.rooftopsolutions.nl/article/270</feedburner:origLink></entry><entry><title type="text">&lt;input type="email"&gt; and Firefox Contacts Add-on</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bijsterespoor/~3/YtO8wsIcrKQ/269" /><author><name>Evert Pot</name><email>evert@rooftopsolutions.nl</email></author><updated>2010-03-17T23:25:49-07:00</updated><id>http://www.rooftopsolutions.nl/article/269</id><content type="html">&lt;p style="float:right; padding=0 0 5px 5px"&gt;&lt;a href="http://mozillalabs.com/blog/2010/03/contacts-in-the-browser/" &gt;&lt;img src="http://www.rooftopsolutions.nl/resources/images/posts/mozlabs_small.png" alt="Mozilla Labs" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yesterday Mozilla Labs published the &lt;a href="http://mozillalabs.com/blog/2010/03/contacts-in-the-browser/" &gt;Contacts&lt;/a&gt; add-on, which I think is pretty neat. The add-on integrates your existing (Twitter, Gmail and AddressBook.app) contacts into your browser. It's pre-alpha stability, but it seems to work for me.&lt;/p&gt; 

&lt;p&gt;After installing it, it allows you to use contacts in two new ways:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Any &amp;lt;input type="email" /&amp;gt; field will now auto-complete with the contacts in your list.&lt;/li&gt;
  &lt;li&gt;A javascript api is added, allowing you (the developer) to pull in contacts from the user. The api is in the &lt;a href="http://www.w3.org/TR/2010/WD-contacts-api-20100121/"&gt;W3C standards track&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I love seeing these types of bite-size non-obtrusive features getting implemented in the browser.&lt;/p&gt;

&lt;p&gt;The &amp;lt;input type="email" /&amp;gt; form element is specified in the &lt;a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state"&gt;HTML5&lt;/a&gt; specification, but it mostly discusses validation &amp;amp; sanitation. It has been supported by Opera for a while, and Safari now does too. Any old browser will also gladly accept type="email", because the behaviour for unknown types has always been to revert to type="text".&lt;/p&gt;

&lt;p&gt;So the next time you're asking your users for an email address, consider using type="email", which automatically makes you future compatible when all the browsers get around implementing it.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/bijsterespoor/~4/YtO8wsIcrKQ" height="1" width="1"/&gt;</content><feedburner:origLink>http://www.rooftopsolutions.nl/article/269</feedburner:origLink></entry><entry><title type="text">Jumping ship! From Subversion To Mercurial</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bijsterespoor/~3/BnMxWu-fWKg/268" /><author><name>Evert Pot</name><email>evert@rooftopsolutions.nl</email></author><updated>2010-02-25T00:11:59-08:00</updated><id>http://www.rooftopsolutions.nl/article/268</id><content type="html">&lt;p&gt;I've been a big fan of &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt; since 2005, but since lately I've been having a bit of distributed source-control envy. Many people seem to be switching to &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; and &lt;a href="http://mercurial.selenic.com/"&gt;Mercurial&lt;/a&gt;, and frankly I've felt a bit left behind.&lt;/p&gt;

&lt;p&gt;For some smaller stuff I've been starting to use Mercurial a bit more, and I've been pretty easily convinced since then. If you have some random code lying around, and need to make some changes you might need to revert? Just enter "hg init ." and now it's a repository. hg add, hg commit and it's committed as a first repository.&lt;/p&gt;

&lt;p&gt;So I've bit the bullet and now also converted &lt;a href="http://code.google.com/p/sabredav/"&gt;SabreDAV&lt;/a&gt; to Mercurial, which was a very easy process using &lt;a href="http://code.google.com/p/support/wiki/ConvertingSvnToHg"&gt;Google's manual&lt;/a&gt; (which by the way could apply for non-google repo's too). The biggest change from here on is to remember to type hg instead of svn.&lt;/p&gt;

&lt;p&gt;Joel Spolsky actually recently wrote a nice &lt;a href="http://hginit.com/"&gt;tutorial for hg&lt;/a&gt;, pretty easy to get through; especially if you already understand version control.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/bijsterespoor/~4/BnMxWu-fWKg" height="1" width="1"/&gt;</content><feedburner:origLink>http://www.rooftopsolutions.nl/article/268</feedburner:origLink></entry><entry><title type="text">CalDAV server for PHP</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bijsterespoor/~3/TAgeoeFQRHg/267" /><author><name>Evert Pot</name><email>evert@rooftopsolutions.nl</email></author><updated>2010-02-01T23:50:58-08:00</updated><id>http://www.rooftopsolutions.nl/article/267</id><content type="html">&lt;p&gt;It's been a long time coming, but I finally have some working CalDAV code. The server has been tested with &lt;a href="http://www.apple.com/support/ical/"&gt;iCal&lt;/a&gt; 3.0 and 4.0 (Leopard and Snow leopard), &lt;a href="http://www.mozilla.org/projects/calendar/sunbird/"&gt;Sunbird&lt;/a&gt; 1.0 pre-release and &lt;a href="http://projects.gnome.org/evolution/"&gt;Evolution&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My main goal is to create a general-purpose CalDAV library, rather than a consumer-ready server app. I'm hoping people will be able to use this library to enable CalDAV functionality in their existing applications.&lt;/p&gt;

&lt;p&gt;If you're interested in hacking around or testing, you'll have to grab a copy from subversion. Full &lt;a href="http://code.google.com/p/sabredav/wiki/CalDAV"&gt;installation instructions&lt;/a&gt; are available. Because of the alpha-stability nature of the code data-loss can occur, so beware!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/bijsterespoor/~4/TAgeoeFQRHg" height="1" width="1"/&gt;</content><feedburner:origLink>http://www.rooftopsolutions.nl/article/267</feedburner:origLink></entry><entry><title type="text">Published in PHP|Architect</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bijsterespoor/~3/Bw5FMYWMoOc/266" /><author><name>Evert Pot</name><email>evert@rooftopsolutions.nl</email></author><updated>2010-01-30T02:50:29-08:00</updated><id>http://www.rooftopsolutions.nl/article/266</id><content type="html">&lt;p style="float: right; padding: 0 0 10px 10px"&gt;&lt;a href="http://phparch.com/c/phpa/magazine/index"&gt;&lt;img src="http://phparch.com/wp-content/themes/phpa/thumb.php?src=http://phparch.com/blogs.dir/3/files/2010/02/0112.jpg&amp;w=200" alt="PHP architect January 2010" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="http://phparch.com/c/phpa/magazine/index"&gt;January issue of PHP|Architect&lt;/a&gt; just got published, and I'm in it!&lt;/p&gt;

&lt;p&gt;I've written an apparent 5-page article about &lt;a href="http://code.google.com/p/sabredav/"&gt;SabreDAV&lt;/a&gt;. The process was a lot of fun. It's definitely quite different from blogging, where quick and dirty is the rule rather than the exception. I hope I get the chance to do this again (all provided if there's another subject I feel knowledgeable enough in).&lt;/p&gt;
 
&lt;p&gt;So if you get a hold of a copy, I would be very interested in your feedback! The magazine is in PDF form these days, so subscribing and downloading is quick and easy =).&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/bijsterespoor/~4/Bw5FMYWMoOc" height="1" width="1"/&gt;</content><feedburner:origLink>http://www.rooftopsolutions.nl/article/266</feedburner:origLink></entry><entry><title type="text">Unicode nearing 50% of the web</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bijsterespoor/~3/HgAfdyalT2I/265" /><author><name>Evert Pot</name><email>evert@rooftopsolutions.nl</email></author><updated>2010-01-29T01:45:32-08:00</updated><id>http://www.rooftopsolutions.nl/article/265</id><content type="html">&lt;p&gt;According to a &lt;a href="http://googleblog.blogspot.com/2010/01/unicode-nearing-50-of-web.html"&gt;recent post&lt;/a&gt; from the Google Blog, Unicode nearing 50% uptake on the web. A rather steep graph as well:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://googleblog.blogspot.com/2010/01/unicode-nearing-50-of-web.html"&gt;&lt;img src="http://3.bp.blogspot.com/_7ZYqYi4xigk/S2Hcx0fITQI/AAAAAAAAFmM/ifZX2Wmv40A/s400/unicode.png" alt="unicode uptake graph" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is pretty good news. I've had the 'pleasure' of working with a number of integration project where the 3rd party was still using iso-8859-1 (aka latin-1). Usually when this is the case, its not by choice but because of their software's default settings (Browsers, MySQL, etc.). I for one hope non-unicode charsets will soon be a thing of the past.&lt;/p&gt;

&lt;p&gt;One other note in the post was about &lt;a href="http://en.wikipedia.org/wiki/Typographical_ligature"&gt;ligatures&lt;/a&gt;, such as &amp;#64257; and the dutch &amp;#307;. If this is the first time you heard about these, you might be surprised to see that you can (likely) only copy-paste &amp;#307; as a whole, and not just the i or j. It's one unicode character, not two. It just made me wonder: what kind of software would generate these, and more importantly why?&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/bijsterespoor/~4/HgAfdyalT2I" height="1" width="1"/&gt;</content><feedburner:origLink>http://www.rooftopsolutions.nl/article/265</feedburner:origLink></entry><entry><title type="text">A case for table-based design</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bijsterespoor/~3/dz9f8CLhY9s/264" /><author><name>Evert Pot</name><email>evert@rooftopsolutions.nl</email></author><updated>2010-01-11T21:06:08-08:00</updated><id>http://www.rooftopsolutions.nl/article/264</id><content type="html">&lt;p&gt;"A topic that has been beaten to death."&lt;/p&gt;

&lt;p&gt;Standards advocates have been largely against the use of the &amp;lt;table&amp;gt; tag. The idea is that it's used for positioning and design, while it really should only be used for real tabular data. HTML should be a document with semantic data, and not contain any presentation information.&lt;/p&gt;

&lt;p&gt;So the response is that all kinds of new techniques are devised to easily make stretchable designs. I just got handed a template that uses one of these techniques, along with a couple of others. Here's a snippet:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.rooftopsolutions.nl/resources/images/posts/crazycss.jpg" /&gt;&lt;/p&gt;

&lt;p&gt;I can't say I blame the author of this code. He's always been told &amp;lt;table&amp;gt;'s are evil, and I have no doubts many 'experts' will suggest techniques like this.&lt;/p&gt;

&lt;p&gt;There's no doubt this could be made much simpler even without using the &amp;lt;table&amp;gt;, but there's no way we can expect every junior frontend developer to memorize "1001 css hacks to make divs behave as a table".&lt;/p&gt;

&lt;p&gt;The truth is, very little html documents are parsed by anything else but browsers and search engines. If an application's data is also consumed by other clients it will almost always be done through some kind of API or standard xml/json document. Even &lt;i&gt;if&lt;/i&gt; html was used as a transport format, it will most likely be a specialized format.&lt;/p&gt;

&lt;p&gt;Keeping HTML pure for data and CSS for presentation is a bit of a pipedream that never worked out. Even if you look at a relatively simple application such as Wordpress, every theme will have it's own HTML template, and not just a separate css stylesheet.&lt;/p&gt;

&lt;p&gt;The point of my story is: HTML is read by browsers and developers. If you can make a brilliant HTML document and still keep pixel precision more power to you, but please keep things legible for the future developer that might need to fix a bug.&lt;/p&gt;

&lt;h3&gt;The upshot&lt;/h3&gt;

&lt;p&gt;CSS3 has support for multiple backgrounds, which will eliminate the need a lot of these problems. Safari has already supported this for a while, and Firefox will get it with the 3.6 release, and opera in 10.5. This leaves the browser that shall not be named.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/bijsterespoor/~4/dz9f8CLhY9s" height="1" width="1"/&gt;</content><feedburner:origLink>http://www.rooftopsolutions.nl/article/264</feedburner:origLink></entry><entry><title type="text">SabreDAV 1.0.4 released</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bijsterespoor/~3/cNhDJO836xg/263" /><author><name>Evert Pot</name><email>evert@rooftopsolutions.nl</email></author><updated>2010-01-10T22:16:40-08:00</updated><id>http://www.rooftopsolutions.nl/article/263</id><content type="html">&lt;p&gt;I just released &lt;a href="http://code.google.com/p/sabredav/"&gt;SabreDAV&lt;/a&gt; version 1.0.4.&lt;/p&gt;

&lt;p&gt;SabreDAV now supports &lt;a href="http://greenbytes.de/tech/webdav/rfc4709.html"&gt;RFC 4709&lt;/a&gt; through a &lt;a href="http://code.google.com/p/sabredav/wiki/DavMount"&gt;plugin&lt;/a&gt;. This RFC defines a standard way to tell operating system a WebDAV share should be mounted. Example code to make this work easily is included in the actual RFC document (scroll down). It is not supported by default by any operation system at the moment, so if you want to plug your own DavMount implementation for OS/X or Linux, I'll be happy to list you.&lt;/p&gt;

&lt;p&gt;The other change is that releases are now also pushed to &lt;a href="http://pearfarm.org/evert/Sabre_DAV"&gt;Pearfarm&lt;/a&gt;. I'm still testing this so this might not end up being the official channel. If you'd like to try the new installation method, you can easily do so using:&lt;/p&gt;

&lt;code&gt;&lt;span style="color: #000000"&gt;
pear&amp;nbsp;channel-discover&amp;nbsp;evert.pearfarm.org
&lt;br /&gt;pear&amp;nbsp;install&amp;nbsp;evert.pearfarm.org/Sabre_DAV
&lt;br /&gt;&lt;/span&gt;
&lt;/code&gt;

&lt;p&gt;&lt;a href="http://code.google.com/p/sabredav/downloads/list"&gt;Download here&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/bijsterespoor/~4/cNhDJO836xg" height="1" width="1"/&gt;</content><feedburner:origLink>http://www.rooftopsolutions.nl/article/263</feedburner:origLink></entry><entry><title type="text">New open PEAR channels</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bijsterespoor/~3/F1Of97jW7OU/262" /><author><name>Evert Pot</name><email>evert@rooftopsolutions.nl</email></author><updated>2010-01-07T20:44:22-08:00</updated><id>http://www.rooftopsolutions.nl/article/262</id><content type="html">&lt;p&gt;For a while I've been pondering if it would be possible to build a free-for-all PEAR channel for everybody to submit their packages. I feel &lt;a href="http://www.phpclasses.org/"&gt;PHP classes&lt;/a&gt; kind of missed the boat here for requiring people to register to download, and well.. basically having a design that's just hard to take serious.&lt;/p&gt; 

&lt;p&gt;So since New Years, there are now 2! Yay for competition, but it's a bit sad they didn't choose to work together. I'm talking about &lt;a href="http://pearfarm.org/"&gt;pearfarm&lt;/a&gt; and &lt;a href="http://pearhub.org/"&gt;pearhub.org&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Why PEAR packages?&lt;/h3&gt;

&lt;p&gt;If you publish your next opensource project as a PEAR package on a real PEAR channel, your users will be able to install PEAR packages by simply entering something like 'pear install packagename'. PEAR packages don't actually have to come from &lt;a href="http://pear.php.net"&gt;pear.php.net&lt;/a&gt;, but they can be hosted by any other server.&lt;/p&gt;

&lt;p&gt;One of the benefits of getting your packages from pear.php.net, is that there is a high degree of quality control, as well as solid coding standards. I do believe though that there is a different part of the market of people who don't want to go through rigorous approval process and just want to get their stuff up for others to download. Inspired by &lt;a href="http://gemcutter.org/"&gt;Gemcutter&lt;/a&gt;; this is where &lt;a href="http://pearfarm.org/"&gt;pearfarm&lt;/a&gt; and &lt;a href="http://pearhub.org/"&gt;pearhub&lt;/a&gt; come in.&lt;/p&gt;

&lt;p&gt;As a bonus you'll get other fancy features PEAR provides, such as dependency management. You can easily make pear automatically download package A from author B if your package is downloaded.&lt;/p&gt;

&lt;h3&gt;What do they have in common?&lt;/h3&gt;

&lt;p&gt;Both pearfarm and pearhub are brand new, so very little packages are available. They also both seem to be a work in progress. Anybody can register for both sites and publish their packages.&lt;/p&gt;

&lt;h3&gt;Differences?&lt;/h3&gt;

&lt;p&gt;Pearfarm seems to be a more complete product, whereas Pearhub resembles the standard &lt;a href="http://www.pirum-project.org/"&gt;Pirum&lt;/a&gt;. Pearfarm also includes tools make it more easy to generate and upload your package and/or new releases. My biggest problem with Pearfarm is actually that it doesn't support OpenID. As a developer I'm surprised to see any code-related site being launched without OpenID support.&lt;/p&gt;

&lt;p&gt;My pick today would be to host my packages on Pearfarm. The beauty of the PEAR system is that you don't have to choose one for downloading packages, because a package from Pearfarm can easily depend on a package from Pearhub.&lt;/p&gt;

&lt;h3&gt;Host your own&lt;/h3&gt;

&lt;p&gt;If you want to host your own pear channel, I can recommend &lt;a href="http://www.pirum-project.org/"&gt;Pirum&lt;/a&gt;. It's an extremely simple system that actually just generates static files. &lt;a href="http://pear.chiaraquartet.net/"&gt;Chiara_PEAR_Server&lt;/a&gt; is a more complete system, but I've found it harder to customize.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/bijsterespoor/~4/F1Of97jW7OU" height="1" width="1"/&gt;</content><feedburner:origLink>http://www.rooftopsolutions.nl/article/262</feedburner:origLink></entry><entry><title type="text">javascript's escape and encodeURI vs. PHP $_POST</title><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/bijsterespoor/~3/tfTUM-_JPD8/261" /><author><name>Evert Pot</name><email>evert@rooftopsolutions.nl</email></author><updated>2010-01-07T01:14:05-08:00</updated><id>http://www.rooftopsolutions.nl/article/261</id><content type="html">&lt;p&gt;I just stumbled upon an odd encoding issue with a web application.&lt;/p&gt;

&lt;p&gt;Basically, data is coming into our PHP application through a Javascript's &lt;a href="http://www.w3.org/TR/XMLHttpRequest/"&gt;XMLHttpRequest (ajax)&lt;/a&gt;. The data is sent as a standard form encoding (application/x-www-form-urlencoded), and picked up by PHP using the $_POST array. Any strings in form POST request are 'urlencoded', also known as &lt;a href="http://en.wikipedia.org/wiki/Percent-encoding"&gt;Percent-encoding&lt;/a&gt;. As an example, this will turn a space into the often-seen %20.&lt;/p&gt;

&lt;p&gt;Normally everything in the $_POST and $_GET arrays is already decoded, so when you're dealing with these arrays you don't really have to think about this. This time however, I was dealing with some non-latin unicode characters and for some reason they were never decoded and ended up in de database as raw url-encoded strings.&lt;/p&gt;

&lt;p&gt;Doing a bit of research led me to the following: normally any special character is encoded as %XX, X and X being 2 hexadecimal values. These values simply represent bytes. The values I got were different altogether and took the form %uXXXX. I just assumed this was part of standard uri-encoding for unicode characters, so I was still a bit shook-up to see that PHP didn't just pick them up.&lt;/p&gt;

&lt;p&gt;After a &lt;a href="http://en.wikipedia.org/wiki/Urlencode#Non-standard_implementations"&gt;bit of research&lt;/a&gt;, I found out that the unicode representation was rejected by W3c, which is probably also why the PHP authors decided to not implement this. Javascript actually has 2 different methods to do percent-encoding, namely:&lt;/p&gt;

&lt;pre&gt;
escape("&amp;#9762;"); // returns %u2622
encodeURI("&amp;#9762;"); // returns %E2%98%A2
&lt;/pre&gt;

&lt;p&gt;Guess which one we were using?&lt;/p&gt;

&lt;p&gt;Even though the %u syntax is arguably better to represent unicode characters, W3c seems to have voted against the syntax for backwards compatibility reasons. Before this happened the escape method was already adopted in javascript which in turn caused me to stumble upon this problem and write &lt;a href="http://www.rooftopsolutions.nl/article/261"&gt;an article&lt;/a&gt; about it.&lt;/p&gt;

&lt;p&gt;The more you know..&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/bijsterespoor/~4/tfTUM-_JPD8" height="1" width="1"/&gt;</content><feedburner:origLink>http://www.rooftopsolutions.nl/article/261</feedburner:origLink></entry></feed>
