Widechar 排序并从文件加载

发布于 2024-12-20 18:37:27 字数 395 浏览 5 评论 0原文

当我需要从文件中加载行然后按正确的顺序对它们进行排序时,我目前正在尝试解决问题。

如果我手动将字母分配给 wint_t 数组,然后对它们进行排序,则任何编码都可以 http://pastebin.com /85eycH15

但是,如果我从文件中读取完全相同的字母,然后尝试对它们进行排序,它仅适用于一种编码(cs_CZ.utf8),而对于其余的编码,它无法正确读取这些字母,或者只是跳过它们 http://pastebin.com/3C8r9W5T

我非常感谢任何帮助。

I'm currently trying to solve the problem when I need to load rows from the file and then sort them in the right order.

If I manually assign lettes to the array of wint_t and then sort them, everything from just fine with any encoding http://pastebin.com/85eycH15.

But if I read the very same letters from file and then try to sort them it works just with one encoding (cs_CZ.utf8) and with the rest of them it doesn't read the letters properly or or just skip them http://pastebin.com/3C8r9W5T.

I highly appreciate any help.

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

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

发布评论

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

评论(1

佞臣 2024-12-27 18:37:27

我假设您获得预期结果的唯一编码是用于数据文件的编码。使用另一种编码重新编码数据文件,您将获得新编码的预期结果,而不是其他编码。

I assume that the only encoding with which you get your expected result is the one used for your data file. Re-encode the data file in another encoding, you'll get your expected result for the new encoding and not others.

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