告诉 Visual Studio 在运行可执行文件时创建 utf-8 环境

发布于 2024-07-30 08:28:08 字数 185 浏览 1 评论 0原文

我使用 CMAKE 和 CTEST 来运行我的回归。 我的应用程序是一个控制台应用程序,它以其环境所呈现的任何编码进行输出(Tcl 的一项功能)。

我如何告诉 Visual Studio 当它运行我的应用程序时在 utf-8 环境中运行它。 现在,我的回归结果是用拉丁语编码的,因此很难与我的 Linux 版本上的回归进行比较。

I am using CMAKE with CTEST to run my regressions. My application is a console app which outputs in whatever encoding it is presented by it's environment (A feature of Tcl).

How do I tell visual studio that when it runs my application to run it in a utf-8 environment. Right now my regression results are encoded in latin, and it makes it difficult to compare with regressions on my linux builds.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

瑾夏年华 2024-08-06 08:28:08

stdout/stderr 流不支持 unicode,因此 Visual Studio 无法从进程接收 unicode 输出。 这是 MS 在 VS 2005 中实现 Unicode 支持时必须解决的问题,请参阅 此博文。 简而言之,cl.exe 使用一组管道将 unicode 输出写入 Visual Studio 控制台窗口。

您的包装器可以将进程的输出转换为系统代码页,或者找出如何打开 cl.exe 使用的 Unicode 管道并写入它们。

The stdout/stderr streams do not support unicode, so Visual Studio has no way of receiving unicode output from your process. This was an issue MS had to work around when implementing Unicode support in VS 2005, see this blogpost. In short, cl.exe uses a set of pipes to write unicode output to the Visual Studio console window.

Your wrapper could either convert the output of your process into the system code-page, or figure out how to open the Unicode pipes used by cl.exe and write to them instead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文