大佬教程收集整理的这篇文章主要介绍了c – 用于字符串编码的boost :: locale to_utf函数,喜欢抛出,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
boost::locale::generator gen; std::locale loc = gen.generate("");// encoding local to the computer. //std::locale loc = gen.generate("en_US.UTF-8"); // tried this too //std::locale loc = gen.generate("en_US.UTF-8"); //doesn't work either std::string someString = "test me"; std::string output = boost::locale::conv::to_utf<char>(someString,loc);
但是当它在to_utf中尝试use_faCET()时,它始终会失败并使用std :: bad_cast.
这将表明正在生成的语言环境的boost locale :: info facet isn’t available.但我尝试了几代不同运气,我希望系统默认始终有效,所以我必须做错其他的地方.
有任何想法吗?
以上是大佬教程为你收集整理的c – 用于字符串编码的boost :: locale to_utf函数,喜欢抛出全部内容,希望文章能够帮你解决c – 用于字符串编码的boost :: locale to_utf函数,喜欢抛出所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。