Adam R. Turner
Adam R. Turner

Reputation: 139

Converting to ASCII with limited Notepad++

IT is tight here, but I'm trying to figure out if there's a way to take a standard XML or HTML file and convert all of the characters using just Notepad++. If I can do it without a plugin that'd be nifty.

I see I can change the encoding to ANSI, but I don't see an option for ASCII, and I don't think they're exactly the same thing, are they? The XML/HTML has to go up on a server, and the ingestion stuff we use doesn't like special characters like apostrophes that don't seem to fit.

I'm guessing because HTTP servers like ASCII. Basically, a lot of time is wasted by techs right now manually pouring over each and every file for these darn characters, which is causing a lot of eyebleed. The encoding of the files by default I think is UTF-8 when they're generated.

Upvotes: 1

Views: 35387

Answers (2)

mbomb007
mbomb007

Reputation: 4251

I'm guessing the reason ASCII isn't listed is because ASCII doesn't support all byte values. ASCII only has bytes 0x00 - 0x7F. UTF-8 is a superset of ASCII, in that the first 128 bytes are the same, but it also supports 0x80 - 0xFF.

See UTF-8 codepage layout

Basically, if there is some reason that you can't use UTF-8 (like you're going to use it for a program that only supports ASCII, like you don't want any bytes 0x80 - 0xFF), simply use UTF-8, and make sure those bytes are not contained in your program.

Note that for the same reason as listed above, you can also use ANSI, which is also a superset of ASCII. See this SO explanation.

Upvotes: 1

uwe
uwe

Reputation: 11

  1. Create a new document (file/new).
  2. Set encoding/character set/western europe/OEM850.
  3. Copy from the ANSI-encoded document and paste in the new document with the other encoding, then save the new document.

That was my way to change from windows to dos encoding.

Upvotes: 1

Related Questions