Widechar 排序并从文件加载
当我需要从文件中加载行然后按正确的顺序对它们进行排序时,我目前正在尝试解决问题。
如果我手动将字母分配给 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您获得预期结果的唯一编码是用于数据文件的编码。使用另一种编码重新编码数据文件,您将获得新编码的预期结果,而不是其他编码。
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.