<p>I load some XML from a servlet from my Flex application like this:</p>

<pre><code>_loader = new URLLoader();
_loader.load(new URLRequest(_servletURL+"?do=load&amp;id="+_id));
</code></pre>

<p>As you can imagine <code>_servletURL</code> is something like <a href="http://foo.bar/path/to/servlet" rel="nofollow noreferrer">http://foo.bar/path/to/servlet</a></p>

<p>In some cases, this URL contains accented characters (long story). I pass the <code>unescaped</code> string to <code>URLRequest</code>, but it seems that flash escapes it and calls the escaped URL, which is invalid. Ideas?</p>

[{'answer_id': 62519, 'author': 'grapefrukt', 'author_id': 914, 'author_profile': 'https://Stackoverflow.com/users/914', 'pm_score': 2, 'selected': False, 'text': '<p>I\'m not sure if this will be any different, but this is a cleaner way of achieving the same URLRequest:</p>\n\n<pre><code>var request:URLRequest = new URLRequest(_servletURL)\nrequest.method = URLRequestMethod.GET;\nvar reqData:Object = new Object();\n\nreqData.do = "load";\nreqData.id = _id;\nrequest.data = reqData;\n\n_loader = new URLLoader(request); \n</code></pre>\n'}, {'answer_id': 62994, 'author': 'Ryan Guill', 'author_id': 7186, 'author_profile': 'https://Stackoverflow.com/users/7186', 'pm_score': 0, 'selected': False, 'text': '<p>From the livedocs: <a href="http://livedocs.adobe.com/flex/3/langref/flash/net/URLRequest.html" rel="nofollow noreferrer">http://livedocs.adobe.com/flex/3/langref/flash/net/URLRequest.html</a></p>\n\n<blockquote>\n  <p>Creates a URLRequest object. If System.useCodePage is true, the request is encoded using the system code page, rather than Unicode. If System.useCodePage is false, the request is encoded using Unicode, rather than the system code page.</p>\n</blockquote>\n\n<p>This page has more information: <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=18_Client_System_Environment_3.html" rel="nofollow noreferrer">http://livedocs.adobe.com/flex/3/html/help.html?content=18_Client_System_Environment_3.html</a></p>\n\n<p>but basically you just need to add this to a function that will be run before the URLRequest (I would probably put it in a creationComplete event)</p>\n\n<p><code>System.useCodePage = false</code>;</p>\n'}, {'answer_id': 87530, 'author': 'Peldi Guilizzoni', 'author_id': 1199623, 'author_profile': 'https://Stackoverflow.com/users/1199623', 'pm_score': 3, 'selected': False, 'text': '<p>My friend Luis figured it out:</p>\n\n<p>You should use encodeURI does the UTF8URL encoding\n<a href="http://livedocs.adobe.com/flex/3/langref/package.html#encodeURI()" rel="noreferrer">http://livedocs.adobe.com/flex/3/langref/package.html#encodeURI()</a></p>\n\n<p>but not unescape because it unescapes to ASCII see\n<a href="http://livedocs.adobe.com/flex/3/langref/package.html#unescape()" rel="noreferrer">http://livedocs.adobe.com/flex/3/langref/package.html#unescape()</a></p>\n\n<p>I think that is where we are getting a %E9 in the URL instead of the expected %C3%A9.</p>\n\n<p><a href="http://www.w3schools.com/TAGS/ref_urlencode.asp" rel="noreferrer">http://www.w3schools.com/TAGS/ref_urlencode.asp</a></p>\n'}]
['https://Stackoverflow.com/questions/62437', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1199623/']