There is a related bug at sourceforge 972994.
As this is an aolserver issue you should either point it out
as a comment there or submit a new bug there.
Thanks. From what I see there, my specific issue is already fixed in recent nsd versions. I'm not itching to upgrade ATM so I'll just hack a "fixed" ns_urlencode in tcl.