The best bet is to do the following sequence:
getFile (as stream)
stringToDocument (passing stream)
getDocumentType
Unless you pass the encoding to the bytesToString service, the default encoding of the VM is used for interpreting the bytes. This is most likely the issue that you’re having.
You’ll need to ensure that your XML document has the proper XML prologue encoding set e.g.
<?xml version="1.0" encoding="UTF-16"?>
#webMethods-General#Integration-Server-and-ESB#webMethods