EXTSCRIPT-166 fixing up the encoding code for the url handling so that it should work properly no matter which system