I am in a Flex 4.0 project attempting to POST to a Java servlet using FileReference.upload(). I am sending some additional parameters such as album name in the POST. This works fine when the characters are in the Latin1 character set. When I try to post a Japanese character or some Unicode character, it doesn't come through on the Java side.
FileReference.upload() ignores the content-type setting and uses a Content-Type of multipart/form-data by default. I do not know what the default encoding is in this case. It appears that it is not UTF-8.
On the java side, httpServletRequest.getCharacterEncoding() shows null. The method is POST but I can't confirm how the data is being encoded.
So the problem is that I seem to be stuck using FileReference.upload() because the user is picking the file to upload. I need to send Unicode but I can't get Flash to encode them properly. Not sure if using URLLoader would help or if I can even get the data out of FileReference into URLLoader (and then lose progress events).