8
I am writing in a file via Streamwriter using the encoding Encoding.ASCII. A situation has appeared where I need to write the letter "Ç". Only if I try to do that, the file leaves the character "?".
In this case, I need to use this encoding (I cannot use UTF8). Is there any way I can treat this character and make it appear correctly in the file?
An excerpt from the code example:
StreamWriter streamArquivo = new StreamWriter(caminhoArquivo, false, Encoding.ASCII);
streamWriter.WriteLine("COBRANÇA");
I tried to see something related to the code of the letter "Ç" in byte, etc but the problem continues. Is there any way to do this?
Why can’t you use UTF-8? What else can’t you use?
– Maniero
@Bigown cannot use this encoding because it is a file used in communication with another system. If I use UTF-8 for example, and I open the file in the MSDOS editor, some characters appear as " " that disturb the communication.That’s why I opted for ASCII, but now I need this word to exit "Ç"
– rafaeldals