I load some XML from a servlet from my Flex application like this:
_loader = new URLLoader();
_loader.load(new URLRequest(_servletURL+"?do=load&id="+_id));
As you can imagine _servletURL
is something like http://foo.bar/path/to/servlet
In some cases, this URL contains accented characters (long story). I pass the unescaped
string to URLRequest
, but it seems that flash escapes it and calls the escaped URL, which is invalid. Ideas?
My friend Luis figured it out:
You should use encodeURI does the UTF8URL encoding http://livedocs.adobe.com/flex/3/langref/package.html#encodeURI()
but not unescape because it unescapes to ASCII see http://livedocs.adobe.com/flex/3/langref/package.html#unescape()
I think that is where we are getting a %E9 in the URL instead of the expected %C3%A9.
http://www.w3schools.com/TAGS/ref_urlencode.asp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With