Trouble with accented characters and MD5 hash

I’m loading in a username from a server via XML. The XML is encoded as UTF-8.

At some point I’m sending back that name with some additional data.
To authenticate the data I’m sending a md5 hash of the username along.

This all works fine for names containing only ‘normal’ characters, however it fails when the name contains accented characters like ë, é, É, etc.
In that case the MD5 hash calculated in AS does not correspond to the hash calculated on the server side.

The problem seems to be that flash internally uses a different text encoding (not UTF?) resulting in a different hash. I’ve doublechecked the XML file’s UTF encoding. I’ve set System.useCodepage to false (which it is by default anyway), all to no avail…

Any help would be greatly appreciated …

==================================

Update: It is not a flash text encoding problem after all - a friend solved it for me by using another MD5 class. Apparently the two md5 classes I tried before don’t cope well with accented character encoding.