Windows MFC控件会随机错误的字符

发布于 2025-01-20 01:01:44 字数 431 浏览 5 评论 0原文

这是一件有趣的事。我正在从卫星 DLL 转向 GNU gettext 进行翻译,并遇到了这个有趣的问题。我尝试过使用硬编码字符串,因此 gettext 不是其原因。

示例不一致的编码

这里字符串在同一菜单中的处理方式不同。 “Välj test”和“Stäng test”都包含相同的字符 (ä),但一个显示正确,另一个显示不正确。当在调试器中查看时,两个字符串看起来都很好,但 Spy++ 确认其中一个是错误的。不知道这里发生了什么。

我在 C++ 中使用 MFC 并使用 Visual Studio 2010(这是一个旧项目)。它被设置为 Unicode。

This is an interesting one. I'm in the process of going from satellite DLLs to GNU gettext for translation and encountered this interesting problem. I have tried with hard coded string so gettext isn't the cause of it.

Example of inconsistent encoding

Here the strings are trated differently in the same menu. "Välj test" and "Stäng test" both contain the same character (ä), but one is displayed correctly while one isn't. When lookin in debugger both strings look fine, but Spy++ confirms that one is wrong. No idea what's going n here.

I'm using MFC in C++ and use Visual Studio 2010 (it's an old project). It's set to Unicode.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文