ANSI encoding is a slightly generic term used to refer to the standard code page on a system usually Windows.
What is ansi encoded text file. String utf8String EncodingUTF8GetStringutf8bytes. One of the first code tables was ASCII created in 1963 by the American National Standards Institute American National Standards Institute abbreviated ANSIAmong other things this encoding contains non-printable characters so-called Control sequences or ESC unique to all character tables. But first read the file and store the value in a str Variable.
You must also know that some character sets are actually subsets of others like eg. A default editor in Windows Notepad allows you to convert text into the ANSI format. However it might be an ISO-8859-1 file which happens to start with the characters ï.
ANSI Format was developed by The American National Standards Institute and presents itself as a Microsoft-related standard for character set encoding. The byte order mark BOM is a unicode character at start which signals the encoding of the text stream file. UCS-2 LE EncodingUTF8 and EncodingUnicode adds a BOM Byte Order Mark to the file.
For example a file with the first three bytes 0xEF0xBB0xBF is probably a UTF-8 encoded file. If the file has been created on the computer where it is being read then you can obtain the ANSI encoding by localegetpreferredencoding. Notepad does its best to guess what encoding a file is using and most of the time it gets it right.
Byte ansiBytes ANSIGetBytesstr. Sometimes it does get it wrong though - thats why that Encoding menu is. Windows-1252 the code page most commonly referred to as ANSI is similar to ISO 8859-1 Latin-1 except that Windows-1252 has printable characters in the range 0x800x9F where ISO 8859-1 has control characters in that range.
De très nombreux exemples de phrases traduites contenant ansi-encoded text file Dictionnaire français-anglais et moteur de recherche de traductions françaises. But the problem is encoding in UTF-8. ANSI means more or less nothing--- the most probable candidate for your encoding is Windows-1252.