【问题标题】:Astyle does not work in WindowsAstyle 在 Windows 中不起作用
【发布时间】:2014-11-27 15:07:13
【问题描述】:

我只是从 SourceForge 下载 Astyle。当我在 /bin 中执行 Astyle.exe 时,它​​说 无法转换为多字节字符串,正在恢复为英文。

我不知道发生了什么。

我发现有a similar question,但那是关于 OS X 中的 Astyle。

这里是与错误相关的源代码。我不知道第二行的意思。

// Not all compilers support the C++ function locale::global(locale(""));
// For testing on Windows change the "Region and Language" settings or use AppLocale.
// For testing on Linux change the LANG environment variable: LANG=fr_FR.UTF-8.
// setlocale() will use the LANG environment variable on Linux.

char* localeName = setlocale(LC_ALL, "");
if (localeName == NULL)     // use the english (ascii) defaults
{
    fprintf(stderr, "\n%s\n\n", "Cannot set native locale, reverting to English");
    setTranslationClass();
    return;
}

最后,请随时纠正我的英文。

【问题讨论】:

    标签: windows astyle


    【解决方案1】:

    将以下包含添加到 ASLocalizer.cppstyle_main.cpp

    【讨论】:

      猜你喜欢
      • 2013-06-03
      • 2017-10-29
      • 2015-11-27
      • 2012-06-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多