【问题标题】:boost::filesystem::path for unicode file paths?boost::filesystem::path 用于 unicode 文件路径?
【发布时间】:2010-09-28 12:24:44
【问题描述】:

有没有办法将 boost::filesystem::path 与 unicode 文件路径一起使用? 特别是我想将它与 std::wstring 一起使用,而不是 std::string。

我在 Windows 平台上工作,有时我需要处理一个包含 unicode 字符的文件路径。

【问题讨论】:

  • 注意:unicode和wstring不一样,wstring指的是宽字符(通常是16bits),unicode指的是字符编码,可以是8bit、16bit甚至32bit。

标签: c++ path boost-filesystem


【解决方案1】:

查看header file,我看到了一个使用 std::wstring 模板化的 wpath。

【讨论】:

  • 注意:wpath 在 boost::filesystem3 中已被弃用
猜你喜欢
  • 2012-09-20
  • 2016-06-02
  • 1970-01-01
  • 2011-02-15
  • 2012-07-06
  • 2011-01-24
  • 2011-04-23
  • 2018-02-18
  • 2012-04-27
相关资源
最近更新 更多