Archive 24. August 2005

JavaScript and the escape() Function

Note to self: escape() in JavaScript is only suitable for latin-1 - a utf-8 string with special characters sends these as latin-1 characters over the line. Pretty stupid when you're tinkering with a form via Ajax and then sending a value to a function in the backend that actually expects utf-8. encodeURIComponent is the answer, not escape.

MochiKit - First Experiences

I had already briefly mentioned MochiKit – A lightweight Javascript library. I used it at viele-bunte-bilder.de (offline since 2007) (so that the owner of a gallery could change the image names and folder names). Pretty brilliant small library for JavaScript. Makes working with JavaScript much more pleasant.