What is ANSI format?

前端 未结 10 907
小鲜肉
小鲜肉 2020-11-22 06:55

What is ANSI encoding format? Is it a system default format? In what way does it differ from ASCII?

相关标签:
10条回答
  • 2020-11-22 07:20

    I remember when "ANSI" text referred to the pseudo VT-100 escape codes usable in DOS through the ANSI.SYS driver to alter the flow of streaming text.... Probably not what you are referring to but if it is see http://en.wikipedia.org/wiki/ANSI_escape_code

    0 讨论(0)
  • 2020-11-22 07:21

    Just in case your PC is not a "Western" PC and you don't know which code page is used, you can have a look at this page: National Language Support (NLS) API Reference

    [Microsoft removed this reference, take it form web-archive National Language Support (NLS) API Reference

    Or you can query your registry:

    C:\>reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage /f ACP
    
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage
        ACP    REG_SZ    1252
    
    End of search: 1 match(es) found.
    
    C:\>
    
    0 讨论(0)
  • 2020-11-22 07:22

    When using single-byte characters, the ASCII format defines the first 127 characters. The extended characters from 128-255 are defined by various ANSI code pages to allow limited support for other languages. In order to make sense of an ANSI encoded string, you need to know which code page it uses.

    0 讨论(0)
  • 2020-11-22 07:23

    Strictly speaking, there is no such thing as ANSI encoding. Colloquially the term ANSI is used for several different encodings:

    1. ISO 8859-1
    2. Windows CP1252
    3. Current system encoding on a Windows machine (in Win32 API terminology).
    0 讨论(0)
提交回复
热议问题