The encoding that Notepad++ just calls “ANSI”, does anyone know what to call it for Ruby?

后端 未结 3 1675
栀梦
栀梦 2020-12-15 16:41

I have a bunch of .txt\'s that Notepad++ says (in its drop-down \"Encoding\" menu) are \"ANSI\".

They have German characters in them, [äöüß], which display fine in N

3条回答
  •  -上瘾入骨i
    2020-12-15 17:44

    I found the answer to this question on the Notepad++ Forum, answered in 2010 by CChris who seems to be authoritative.

    Question: Encoding ANSI?

    Answer:

    That will be the system code page for your computer (code page 0).

    More Info:

    Show your current code page.

    >help chcp
    Displays or sets the active code page number.
    
    CHCP [nnn]
    
      nnn   Specifies a code page number.
    
    Type CHCP without a parameter to display the active code page number.
    
    >chcp
    Active code page: 437
    

    Code Page Identifiers

    Identifier  .NET Name  Additional information
    437         IBM437     OEM United States
    

提交回复
热议问题