I’ve been working on PledgeBank quite a bit recently. As well as adding survey emails asking whether signers have done their pledge, and a feature for people to contact a pledge’s creator, I’ve been fixing numerous bugs that have sprung up along the way. For starters, people on the Isle of Man and the Channel Islands now get a much more helpful error if they try and enter their postcode anywhere on the site, rather than the confusing postcode not recognised they were getting previously.
Other errors I found turned out not to be with our code. The PledgeBank test suite (that we run before deploying the site to check it all still works) was throwing lots of warnings about “Parsing of undecoded UTF-8 will give garbage” when it got to the testing of our other language pages. Our code wasn’t doing anything special, and there were multiple places the warning came from – upgrading our libwww-perl removed one, and I’ve submitted bug reports to CPAN for the rest (having patched our copies locally – hooray for open source).
The Perl warnings were at least understandable, though. While tracking down why the site was having trouble sending a couple of emails, I discovered that we had a helper function splitting very long words up to help with word-wrapping – which when applied to some Chinese text was cutting a UTF-8 multibyte character in two and invalidating the text. No problem, I think, I simply have to add the “/u” modifier to PHP’s regular expression so that it matches characters and not bytes. This didn’t work, and after much playing had to submit a bug report to PHP – apparently in PHP “non-space character followed by non-space character” isn’t the same as “two non-space characters in a row”…
RSS feed
August 15th, 2007 at 10:06am
Hooray, now Matthew’s fixing the rest of the internet!
May 29th, 2009 at 5:08pm
Почему такое множество людей мечтают о собственном коттедже? Причин на то немало. Одной из них чаще всего становится то, что личный коттедж предоставляет возможность воплотить в жизнь человека собственные фантазии и представления о том, каким должен быть загородный дом. Какие в нем будут стены, сколько будет комнат, какого размера и формы будут окна. Узнать самую полную информацию о строительстве коттеджей, индивидуальной архитектуре, избежание проблем со строительством возможно на Интернет-сайте cottageks.ru
Проектирование коттеджей