problem creating files with iso-8859-2 encoding
-
I´m trying to create .txt files with iso-8859-2 encoding, but I have problems with some of the characters from the charset. They don´t display correctly in the file. Here is my code sample that I use to create the files: File.WriteAllText(filePath, fileContent, Encoding.GetEncoding("iso-8859-2")); Can anyone help me with this?
cellardoor
-
I´m trying to create .txt files with iso-8859-2 encoding, but I have problems with some of the characters from the charset. They don´t display correctly in the file. Here is my code sample that I use to create the files: File.WriteAllText(filePath, fileContent, Encoding.GetEncoding("iso-8859-2")); Can anyone help me with this?
cellardoor
-
That looks perfectly fine. What are you using to display the file? Does the encoding actually support the characters that you write to it?
Despite everything, the person most likely to be fooling you next is yourself.
I use Notepad. Yes according to http://en.wikipedia.org/wiki/ISO_8859-2[^] the encoding supports the characters I´m trying to write.
cellardoor
-
I use Notepad. Yes according to http://en.wikipedia.org/wiki/ISO_8859-2[^] the encoding supports the characters I´m trying to write.
cellardoor
-
cellardoor0716 wrote:
I use Notepad.
That would probably explain it. Notepad only uses that encoding if it's the default encoding for your system.
Despite everything, the person most likely to be fooling you next is yourself.
Yes, that was the problem, thanks for your help.
cellardoor