How to programatically default the encoding of my "Notepad" into ANSI in c#

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: jj (yhcontact_at_yahoo.com)
Date: 12/06/04


Date: Mon, 6 Dec 2004 14:35:38 -0500

How do I programatically default the encoding of my "Notepad" into ANSI.
My application uses notepad to save some text. Some of the client computers
have UTF as the default encoding in their notepad. This adds some
characters in my text and creates problems later on managing it.

So is there a way to create a text file in notepad with ANSI encoding
always?

Thanks
John



Relevant Pages

  • Re: Try this
    ... Notepad is not able to save the following text line. ... specify Unicode the you will get what you see above. ... there is no excuse for it not to re-open in ANSI. ... The very presence of an algorithm to detect encoding is a bug. ...
    (comp.lang.python)
  • =?iso-8859-1?q?UTF-8_Datei_als_ANSI_=FCber_WSH_speichern?=
    ... erstellt im Encoding ANSI speichern. ... Wenn ich das manuell in Notepad ... Dokument den Output auf Ansi oder SO-8859-1 einstellen, ... über ein weiteres VBS Script automatisieren? ...
    (microsoft.public.de.german.scripting.wsh)
  • Re: notepad saves as ANSI, what about c#
    ... UTF-8 and ANSI are very different beasts. ... Notepad refers to as ANSI is the Windows codepage set for the user the ... this file will be actually saved in the 1251 encoding. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Try this
    ... with they .txt extension should always be treated as ANSI even if they ... Notepad should never be allowed to try to decide ... what the encoding is if the the open dialog has the encoding set to ... FWIW, I'm not a big fan of heuristics, either (and this behavior would ...
    (comp.lang.python)
  • Re: Convert DOS Cyrillic text to Unicode
    ... that a user paste DOS Cyrillic text (taken from Notepad) ... Strings in .NET are always Unicode! ... I've only used the normal encoding for requests & response in ASP.NET, ... Notice that in the above there is a whole lot of converting going on! ...
    (microsoft.public.dotnet.languages.vb)