character-encoding - 如何在 SublimeText2 中有效地设置项目默认编码?

标签 character-encoding sublimetext2 opensuse

我有 sublime-project 文件如下:

{
"default_encoding": "Central European (ISO 8859-2)",
"fallback_encoding": "Central European (ISO 8859-2)",
"folders":
[
    {
        "folder_exclude_patterns":
        [
            "*.Trash*"
        ],
        "follow_symlinks": true,
        "path": "cok_gnb"
    },
    {
        "follow_symlinks": true,
        "path": "Dokumenty"
    }
],
"settings":
{
    "line_padding_bottom": 3,
    "tab_size": 4
}
}

选项:“default_encoding”和“fallback_encoding”无效 - 当我打开 ST2 文件时,文件已经使用 Windows 1252 编码打开。

怎么了?也许还有另一种选择来强制 ST2 使用编码?

当我忘记使用“使用编码打开”菜单选项并弄乱大文件时,这令人沮丧,有时我不得不将其删除并再次从 repo 中提取。

我使用 OpenSuse 12.3。

最佳答案

您应该将 "default_encoding""fallback_encoding" 放入 "settings"

{
    "folders":
    [
        {
            "folder_exclude_patterns":
            [
                "*.Trash*"
            ],
            "follow_symlinks": true,
            "path": "cok_gnb"
        },
        {
            "follow_symlinks": true,
            "path": "Dokumenty"
        }
    ],
    "settings":
    {
        "default_encoding": "Central European (ISO 8859-2)",
        "fallback_encoding": "Central European (ISO 8859-2)",
        "line_padding_bottom": 3,
        "tab_size": 4
    }
}

关于character-encoding - 如何在 SublimeText2 中有效地设置项目默认编码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19538153/

相关文章:

Java Spring Hibernate - 没有来自 HTML 表单的波兰语字母

c++ - 如何将字符串从 C# 传递到 C++ 并指定编码

java - Java 字符串中正斜杠 ('\u002f' ) 的编码

keyboard-shortcuts - 在 PyCharm 中使用 Sublime Text 2 键绑定(bind)

linux - 无法更新 CMake

php - mySQL(和 php)中的特殊字符 - 基础知识

sublimetext2 - Ctrl+单击后删除 Sublime Text 中的光标

sublimetext2 - Sublime text 2 - 更改侧边栏颜色

Linux : How can i find compilation flag of library provided by Opensuse i. e libOSmesa.so?

linux - 相同的 shell 脚本在不同的 Linux 发行版上有不同的行为