Sunday 1 January 2012

AS3 URLLoader Character Set Issue

When trying to send data to a URL which has special characters, like characters with accents. The characters do not get sent correctly therefore you need to encode the URI to ensure the characters can be read.

Encode the URL using encodeURI before you create a URLRequest, and that will solve the problem.

url = encodeURI (url);
var request:URLRequest = new URLRequest(url);