5

I'm trying to convert UTF-8 to ANSI encoding through a tool.
But it shows Western European (Windows)-1252 instead of ANSI.

Are they both the same thing? Should I go ahead with this?

Henke
  • 813
  • 1
  • 8
  • 20
Abd
  • 119
  • 2
  • 3
  • 7

2 Answers2

4

What is the difference between Windows-1252 and ANSI encoding?

See below. In practice it probably won't make much difference to your conversion.

If you keep a copy of the original file then you can always apply a different conversion if necessary.

Having said that there are ways of converting UTF-8 to ANSI.


Windows-1252

This character encoding is a superset of ISO 8859-1 in terms of printable characters, but differs from the IANA's ISO-8859-1 by using displayable characters rather than control characters in the 80 to 9F (hex) range. Notable additional characters include curly quotation marks and all the printable characters that are in ISO 8859-15. It is known to Windows by the code page number 1252, and by the IANA-approved name "windows-1252".

...

Historically, the phrase "ANSI Code Page" (ACP) is used in Windows to refer to various code pages considered as native. The intention was that most of these would be ANSI standards such as ISO-8859-1. Even though Windows-1252 was the first and by far most popular code page named so in Microsoft Windows parlance, the code page has never been an ANSI standard. Microsoft explains, "The term ANSI as used to signify Windows code pages is a historical reference, but is nowadays a misnomer that continues to persist in the Windows community.

Source Windows-1252

Note that is spite of the above statement by Microsoft they still call Windows 1252 "ANSI":

enter image description here

Source Code Page 1252 Windows Latin 1 (ANSI)

DavidPostill
  • 153,128
  • 77
  • 353
  • 394
  • so, there won't be difference in conversion. good explaination. thank you – Abd Jan 08 '17 at 15:27
  • If you read the first bit of the answer again you will see that there *may* be a difference "differs from the IANA's ISO-8859-1 by using displayable characters rather than control characters in the 80 to 9F (hex) range" - it depends on exactly what characters are in your input. – DavidPostill Jan 08 '17 at 15:29
  • i'm asked to finish my project through windows notepad encoding. hope you now understand what type of encoding i'm looking for. – Abd Jan 08 '17 at 15:33
  • You could use [Notepad++](https://notepad-plus-plus.org/), it has build in encoding conversion from UTF-8 to ANSI :) – DavidPostill Jan 08 '17 at 15:49
1

Are Windows-1252 and ANSI the same thing?

– Yes, for Western European languages, they are identically the same encodings. 1

For other natural languages, see my table at the end of this answer.

Unfortunately, the Wikipedia pages on the topic, this and this,
are riddled with confusing statements and unreferenced claims.

You are much better off going directly to one of the sources that Wikipedia does reference.
It was written in May 2002 and says :

The term “ANSI” as used to signify Windows code pages is a historical reference, but is nowadays a misnomer that continues to persist in the Windows community. The source of this comes from the fact that the Windows code page 1252 was originally based on an ANSI draft, which became ISO Standard 8859-1. However, in adding code points to the range reserved for control codes in the ISO standard, the Windows code page 1252 and subsequent Windows code pages originally based on the ISO 8859-x series deviated from ISO. To this day [May 2002], it is not uncommon to have the development community, both within and outside of Microsoft, confuse the 8859-1 code page with Windows 1252, as well as see “ANSI” or “A” used to signify Windows code page support.

References


1 For charts displaying the Windows-1252 character set, see this post, Section 4.

Henke
  • 813
  • 1
  • 8
  • 20