Windows为什么要使用ANSI代码页而不是UNICODE?

Jae*_*Kim 3 windows unicode encoding ucs2 utf-16

当我chcpcmd.exe窗口中运行命令时,它表示Windows中使用的代码页。

我认为Windows使用UNICODE字符集。

因此,我的问题是:

  1. Windows为什么使用ANSI代码页而不是Unicode?

  2. Windows uses UTF-16 or UCS-2? Can I check this (by command or MSDN link)?

  3. UTF-16 or UCS-2 is just an encoding? or is also a character set?

  4. UTF-8, UTF-16, UTF-32, etc .. do they have different character set size?

I'm so confused. please somebody define them.

Rem*_*eau 6

  1. 历史原因和向后兼容性。Windows本身是基于Unicode的操作系统,并且自从NT时代出现以来。但是许多旧式(甚至是当前)应用程序都不是为Unicode编写的。启用Unicode的应用程序不使用ANSI代码页,除非它们需要在ANSI和Unicode之间转换运行时数据。

  2. Microsoft在Windows 2000中切换到UTF-16。在此之前,它使用UCS-2。请参阅Microsoft Windows中的Unicode

  3. UTF-16和UCS-2都只是相同Unicode字符集的编码。发明了UTF-16以支持UCS-2无法处理的U + FFFF以上的编码代码点。

  4. 所有UTF(包括许多您尚未命名的UTF)都只是相同Unicode字符集的编码。名称中指定的数字是编码编码单位中使用的位数(UTF-8使用8位编码单位,UTF-16使用16位编码单位,依此类推)。