How do I decode a base64 encoded string containing an XML document that contains latin letters (á,é,í,ó,ú)
?
I am aware of this question How do I encode and decode a base64 string? But the solutions provided do not work well with letters that have accents.
So far I've tried:
xmlBase64 = System.Text.Encoding.ASCII.GetString(System.Convert.FromBase64String(XmlDoc));
xmlBase64 = System.Text.Encoding.Unicode.GetString(System.Convert.FromBase64String(XmlDoc));
xmlBase64 = System.Text.Encoding.UTF8.GetString(System.Convert.FromBase64String(XmlDoc));
xmlBase64 = System.Text.Encoding.UTF32.GetString(System.Convert.FromBase64String(XmlDoc));
But in all cases the latin letters (spanish characters) are replaced with ?
or similars.
EDIT:
This is the base64 encoded string
This is the Decoded string