Wednesday 14 November 2012

I hate you, Javascript

But not as much as the people who's got the great idea to insert special characters in some Oracle tables! It took me half a day to correctly decode the parameters I got from the url and to make Oracle read them.
What I learned today:

  1. The javascript "unescape" function is super,super great... alone it resolves the majority of the issues of url encoding :)
  2. On the other side, accented characters are a bitch... you never know what you're going to come up with (for example, 'à' becomes 'Ã '... and don't forget the space!!!)
  3. Last but not the least: be sure to replace your special characters in the correct way. If you have to pass a query string to a db, be sure to use the html number, NOT the html name! This link is great to have on hand: http://www.ascii.cl/htmlcodes.htm
A lot of effort and time later, I finally got the point I wanted on my map:


No comments:

Post a Comment