ANSI encoding is a slightly generic term used to refer to the standard code page on a system, usually Windows. It is more properly referred to as Windows-1252 on Western/U.S. systems. (It can represent certain other Windows code pages on other systems.) This is essentially an extension of the ASCII character set in that it includes all the ASCII characters with an additional 128 character codes. This difference is due to the fact that "ANSI" encoding is 8-bit rather than 7-bit as ASCII is (ASCII is almost always encoded nowadays as 8-bit bytes with the MSB set to 0). See the article for an explanation of why this encoding is usually referred to as ANSI.

The name "ANSI" is a misnomer, since it doesn't correspond to any actual ANSI standard, but the name has stuck. ANSI is not the same as UTF-8.

Answer from Noldorin on Stack Overflow
🌐
Wikipedia
en.wikipedia.org › wiki › ANSI_character_set
ANSI character set - Wikipedia
August 13, 2026 - Windows code pages, a collection of 8-bit character sets compatible with ASCII but incompatible with each other, especially those code pages that are partly compatible with ISO-8859, most commonly Windows Latin 1 · Windows-1252 is referred to as "ANSI" especially often
Top answer
1 of 11
334

ANSI encoding is a slightly generic term used to refer to the standard code page on a system, usually Windows. It is more properly referred to as Windows-1252 on Western/U.S. systems. (It can represent certain other Windows code pages on other systems.) This is essentially an extension of the ASCII character set in that it includes all the ASCII characters with an additional 128 character codes. This difference is due to the fact that "ANSI" encoding is 8-bit rather than 7-bit as ASCII is (ASCII is almost always encoded nowadays as 8-bit bytes with the MSB set to 0). See the article for an explanation of why this encoding is usually referred to as ANSI.

The name "ANSI" is a misnomer, since it doesn't correspond to any actual ANSI standard, but the name has stuck. ANSI is not the same as UTF-8.

2 of 11
70

Technically, ANSI should be the same as US-ASCII. It refers to the ANSI X3.4 standard, which is simply the ANSI organisation's ratified version of ASCII. Use of the top-bit-set characters is not defined in ASCII/ANSI as it is a 7-bit character set.

However years of misuse of the term by the DOS and subsequently Windows community has left its practical meaning as “the system codepage of whatever machine is being used”. The system codepage is also sometimes known as ‘mbcs’, since on East Asian systems that can be a multiple-byte-per-character encoding. Some code pages can even use top-bit-clear bytes as trailing bytes in a multibyte sequence, so it's not even strict compatible with plain ASCII... but even then, it's still called “ANSI”.

On US and Western European default settings, “ANSI” maps to Windows code page 1252. This is not the same as ISO-8859-1 (although it is quite similar). On other machines it could be anything else at all. This makes “ANSI” utterly useless as an external encoding identifier.

Discussions

How to convert .txt to ANSI encoding
Hello Guys! I am trying to convert files from any encoding to ANSI like this: UiPath.Core.Activities.ReadTextFile and then UiPath.Core.Activities.WriteTextFile The last activity has an option called Encoding, which parameters are defined this link [https://activities.uipath.com/docs/suppor... More on forum.uipath.com
🌐 forum.uipath.com
5
0
August 2, 2018
ENCODING PROBLEM- Reading an ANSI File
You are probably not reading the file with the right encoding. Get-Content has an -Encoding parameter that has ascii as an option, or you can pass-in a system.text.encoding object. The SteamReader can also take an encoding as one of the constructor parameters. You can use [System.IO.StreamReader]::new to see them all. e: looks like this site has a list of encodings that contain the character: https://unicode.scarfboy.com/?s=%E2%80%99 More on reddit.com
🌐 r/PowerShell
5
3
February 7, 2024
Need help converting special characters to ANSI.
On the belief that by "ANSI" you're actually referring to the 8-bit character set on Windows code page 1252, there's no native PowerShell cmdlets I'm aware of that do this. Here's one way using .NET methods, though: $f = Get-Content "utf8.txt" -Raw -Encoding Byte $a = [System.Text.Encoding... More on reddit.com
🌐 r/PowerShell
11
6
February 8, 2019
Encoding, Character Sets, and Culture are the Devil

You can force the Default encoding type, that GC uses. Then, it works fine through the streamreader.

$Default = [System.Text.Encoding]::Default
$File = "Path\File.txt"
$streamReader = New-Object System.IO.StreamReader($File, $Default)
$StreamReader.ReadLine()
More on reddit.com
🌐 r/PowerShell
3
9
September 20, 2017
🌐
Gaijin
gaijin.at › en › infos › ascii-ansi-character-table
ASCII and ANSI Character Table
The generic term ANSI (American National Standards Institute) is used for 8-bit character sets. These character sets contain the unchanged ASCII character set. In addition, they contain further characters from 128 to 255, which differ in the various ANSI character sets.
🌐
Alan Wood
alanwood.net › demos › ansi.html
ANSI character set and equivalent Unicode and HTML characters
The ANSI set of 217 characters, also known as Windows-1252, was the standard for the core fonts supplied with US versions of Microsoft Windows up to and including Windows 95 and Windows NT 4.
🌐
EDI Academy Blog
ediacademy.com › blog › ansi-encoding
ANSI Encoding | EDI Blog
March 24, 2024 - ANSI Encoding is based on the ASCII (American Standard Code for Information Interchange) character set, which includes characters such as letters, digits, punctuation marks, and control characters.
🌐
Vovsoft
vovsoft.com › blog › difference-between-ansi-and-utf-8
Difference between ANSI and UTF-8 - Vovsoft
September 19, 2022 - (It can represent certain other Windows code pages on other systems.) This is essentially an extension of the ASCII character set in that it includes all the ASCII characters with an additional 128 character codes.
Find elsewhere
🌐
UiPath Community
forum.uipath.com › help
How to convert .txt to ANSI encoding - Help - UiPath Community Forum
August 2, 2018 - Hello Guys! I am trying to convert files from any encoding to ANSI like this: UiPath.Core.Activities.ReadTextFile and then UiPath.Core.Activities.WriteTextFile The last activity has an option called Encoding, which parameters are defined this link [https://activities.uipath.com/docs/supported-character-encoding] But in the list I’m not finding ANSI encoding, it just says that “If no Byte Order Marks are detected, the system ANSI code page is selected by default.” And I’m writing “” to forc...
🌐
MedCalc
medcalc.org › home › manual › appendices › miscellaneous tables
ANSI character set | MedCalc software
1 month ago - Note that the term ANSI actually refers to Windows code page 1252.
🌐
Microsoft Learn
learn.microsoft.com › en-us › office › vba › language › reference › user-interface-help › character-set-128255
Character set (128 - 255) | Microsoft Learn
The values in the table are the Windows default. However, values in the ANSI character set above 127 are determined by the code page specific to your operating system.
🌐
Community
community.safe.com › home › forums › fme form › transformers › character encoding - ansi = iso-8859-1?
Character encoding - ANSI = iso-8859-1? | Community
May 27, 2020 - As stated above, the default encoding will be system default. If you change the encoding to <not set>, the attributes will be encoded as is from the source. So it seems that ANSI means "system encoding".
🌐
Chilkat
chilkatsoft.com › ansi_charset_explained.asp
Explaining the ANSI Charset
The term ANSI Charset is used in Windows environments to describe the default character encoding for the system locale.
🌐
Rocket Software
www3.rocketsoftware.com › bluezone › help › v51 › en › bz › APPENDIX › Ansi_Char_Set.htm
Library
Skip to main contentSkip to search · Powered by Zoomin Software. For more details please contactZoomin · Refine Results · Clear filters · View Results · Close · Library · Use up/down arrow keys to navigate, Esc to collapse · Last Updated
🌐
W3Schools
w3schools.com › charsets › ref_html_ansi.asp
HTML Windows-1252 - ANSI Reference
The intention was that these character sets would be an ANSI standard like ISO-8859-1.
🌐
TutorialsPoint
tutorialspoint.com › difference-between-ansi-and-utf-8
Difference between ANSI and Unicode
May 15, 2023 - ANSI is not a character encoding in and of itself but rather a collection of character sets utilized by several standards organizations.
🌐
Alan Wood
alanwood.net › demos › charsetdiffs.html
Differences between ANSI, ISO-8859-1 and MacRoman character sets
June 18, 2000 - The ANSI character set, also known as Windows-1252, has become a Microsoft proprietary character set; it is a superset of ISO-8859-1 with the addition of 27 characters in locations that ISO designates for control codes.
🌐
IANA
iana.org › assignments › character-sets
Character Sets
These are the official names for character sets that may be used in the Internet and may be referred to in Internet documentation. These names are expressed in ANSI_X3.4-1968 which is commonly called US-ASCII or simply ASCII. The character set most commonly use in the Internet and used especially in protocol standards is US-ASCII, this is strongly encouraged.
🌐
W3Schools
w3schools.com › html › html_charset.asp
HTML Charset
The HTML specification encourages web developers to use the UTF-8 character set. UTF-8 covers almost all of the characters and symbols in the world! ... ASCII was the first character encoding standard for the web. It defined 128 different latin characters that could be used on the internet: ... Some special characters: ! $ + - ( ) @ < > . # ? ANSI (Windows-1252) was the first Windows character set:
Top answer
1 of 2
1

You can use any character-set and any encoding to create a file and to view it.

You just have to be sure, when viewing, to use the same set and encoding as was used to write the file.

Most character sets actually have a large overlap. For example, most character sets (excluding EBCDIC and others) have the ASCII character set at the same positions (i.e. with same code-points) as ASCII. Therefore you could write a file in the Unicode character set with UTF-8 encoding and, so long as the file contained only characters that are in ASCII, you could view that file using a Windows Latin-1 encoding.

Note: Microsoft are very sloppy with terms such as "ANSI" and "Unicode".


Update:

Firstly, you should pay attention to Jukka's Answer as Jukka is an expert in this subject.

As for your Á, see this extract from here

Dec Hex ASC PC  437 850 Win Lat1    Uni
192 00C0        └   └   └   À   À   À
193 00C1        ┴   ┴   ┴   Á   Á   Á
194 00C2        ┬   ┬   ┬   Â   Â   Â
195 00C3        ├   ├   ├   Ã   Ã   Ã
196 00C4        ─   ─   ─   Ä   Ä   Ä
197 00C5        ┼   ┼   ┼   Å   Å   Å

Note that Á is at code point 194 (0xC1) in Windows Latin-1, in ISO 8859-1 Latin 1 and in Unicode / ISO 10646. If you wrote Á in Windows Latin-1 you could view it as ISO 8859-1.

You would have problems if you tried to read it as Unicode as Unicode encodings use multiple bytes to represent that character,


# echo $LANG
en_US.UTF-8

# cat t
TEST Á

# hexdump -C t
00000000  54 45 53 54 20 c3 81 0a                           |TEST ...|
00000008

Note that Á (Unicode code point 00C1) is encoded in UTF-8 as c3 81

2 of 2
1

The default encoding in Notepad++ is called “ANSI”, without clarification; it may mean windows-1252, or it may mean whatever 8-bit encoding is the system’s native 8-bit encoding (in your case, it’s probably windows-1252 anyway). “ANSI” is a Microsoft misnomer for its 8-bit encodings, one of which (now known as windows-1252) was long ago submitted to the American National Standards Institute for approval – and rejected.

There is no problem in entering “Á” in windows-1252 encoding. Naturally, Notepad++ also displays it OK. So do many, many other programs.

You would need UTF-8 if you wanted to enter “Ć” for example. Many people use UTF-8 even if they don’t need characters outside windows-1252 right now, to avoid any need to change the encoding later, if new characters are added.

🌐
Medium
medium.com › @jimmy760205 › ascii-ansi-and-unicode-41e0241b75d4
ASCII, ANSI, Unicode, and UTF-8 | Medium
March 28, 2020 - After converted Unicode to ANSI, 人 is stored as 0xA4, 0x48 in std::string, which is encoded by Big-5.