Notepad ++只是调用“ANSI”的编码,有谁知道什么称为Ruby? [英] The encoding that Notepad++ just calls "ANSI", does anyone know what to call it for Ruby?

查看:297
本文介绍了Notepad ++只是调用“ANSI”的编码,有谁知道什么称为Ruby?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一堆.txt的记事本++(在它的下拉编码菜单)是ANSI。

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

他们有德语字符,[äöüß],它在Notepad ++中显示得很好。

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

但是当我 File.read一个德语文本example.txt'他们。

因此,任何人都知道我应该提供什么参数 Encoding.default_external =

So does anyone know what argument I should give Encoding.default_external=?

(我假设会是解决方案,对吧?)

(I'm assuming that'd be the solution, right?)

'utf-8''cp850'时,它会读取ANSI文件äöüß 在其中作为\xE4\xF6\xFC\xDF...

When 'utf-8' or 'cp850', it reads the "ANSI" file with "äöüß" in it as "\xE4\xF6\xFC\xDF"...

(请不要犹豫地提到显然明显 )

(Please don't hesitate to mention apparently "obvious" things in your answers; I'm pretty much as newbish as you can be and still know just enough to ask this question.)

推荐答案

它们的含义可能是ISO / IEC 8859-1(aka Latin-1),ISO-8859-1,ISO / IEC 8859-15(aka Latin-9)或Windows-1252(aka CP 1252)。所有4个人在 0xE4 处有ä

What they mean is probably ISO/IEC 8859-1 (aka Latin-1), ISO-8859-1, ISO/IEC 8859-15 (aka Latin-9) or Windows-1252 (aka CP 1252). All 4 of them have the ä at position 0xE4.

这篇关于Notepad ++只是调用“ANSI”的编码,有谁知道什么称为Ruby?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆