File.WriteAllText( , Encoding.GetEncoding("iso-8859-1")) RRS feed

  • Question

  • Hello All,

    I am having an issue with write text in ISO encode.

            static void Main(string[] args)
                const string originalStr = "≥";
                System.IO.File.WriteAllText(@"c:\temp\convertToISO.txt", originalStr, Encoding.GetEncoding("iso-8859-1"));
    If opened with Notepad, you see a "?" question mark symbol.

    If looked into with a hex editor like the one that I found on the net (, the output file contains one character whose hex representation is 0x3f.

    Hope anyone could shed some light on this matter.



    Thursday, August 1, 2019 12:26 PM