When programming desktop applications I’ve always been a supporter of lazy loading of objects but I’ve never given this much thought when creating websites. Until now. (more…)
I’m don’t how well this development model works with dynamic data etc. but I’m sure they have a clever way to do that too. Will report more later when I’ve tested it :)
When implementing script.aculo.us’ AJAX In Place Editor for a project I’m currently working on, I ran into some character encoding problems. My PHP framework uses ISO-8859-1, while the ajax script was submitting UTF-8 to my server. Reading the wiki documentation, I discovered that this was a ‘known feature’:
The form data is sent encoded in UTF-8 regardless of the page encoding.
I was recommended to use iconv to convert back to ISO-8859-1 on the server. Unfortunately this was not an option for me, as it wasn’t available on the production server. Of course, there is PHP’s utf8_decode(), but anyone who has used it will tell you it is totally unreliable.
So, here’s how to get it to use the encoding of your page (e.g. ISO-8859-1) instead of UTF-8. This is based on the info I found in this bug report.