0

I have a web service which serves data to various applications in an XML format. Within that XML is a text file which is Base64 encoded.

What this web service does is receives a string, saves it as a text file using character set windows-1252 (western europian). It then feeds into a third party DLL the filename. The DLL then opens it and converts it to ISO-5426 and saves it to a new results file. I should state I have no control over this DLL.
The web service must then open the results file, convert it to base64 and return it as part of the XML results.

The problem I'm having is that it seems that you can't open a file in .NET with character set ISO-5426. and if it's opened any other way characters are changed or removed.

Is it possible to import the ISO-5426 standard into .NET or is there some other way to fix this?

I'm not an expert on character sets or ISO standards so please be gentle.

StuartMc
  • 666
  • 7
  • 12
  • You should probably implement a subclass of [System.Text.Encoding](http://msdn.microsoft.com/en-us/library/system.text.encoding%28v=vs.110%29.aspx) for ISO-5426 yourself. – Karol S Oct 22 '14 at 22:12
  • system.text.encoding doesn't seem to support ISO-5426 though. – StuartMc Oct 24 '14 at 09:50
  • So implement it yourself. Start with `public class ISO5426: Encoding {` and go from there. There is an encoding generator for Silverlight (Silverlight supports even less encodings) that creates implementations of Encoding for any encoding supported by full .NET Framework; you can use it as a template: http://www.hardcodet.net/2010/03/silverlight-text-encoding-class-generator Also, see this answer: http://stackoverflow.com/a/16009664/1648987 – Karol S Oct 24 '14 at 10:38

0 Answers0