[問題] boost::filesystem 路徑問題 (許功蓋相關)
Hi 各位版友好,
弟今日試用了 boost::filesystem::recursive_directory_iterator
真是一個強大的功能,這樣就可以剩下許多自行走訪檔案、目錄的時間。
不過遇到含有許功蓋等特殊字元的路徑時,它會顯示成 ????
像是:
d:/photo/中文.JPG
d:/photo/???
d:/photo/??????
原本應該是:
d:/photo/許功蓋
d:/photo/許功蓋/功.JPG
想詢面一下應該怎麼處理讓他正常顯示?
==============================================================
#include <iostream>
#include "boost/filesystem.hpp"
#include "boost/progress.hpp"
namespace fs = boost::filesystem;
int main(void) {
boost::progress_timer t(std::clog);
fs::recursive_directory_iterator end;
fs::path path("d:\\photo");
fs::recursive_directory_iterator iter(path);
while (iter != end) {
std::cout << *iter << std::endl;
iter++;
}
return EXIT_SUCCESS;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.231.48.9
→
08/09 01:14, , 1F
08/09 01:14, 1F
推
08/09 15:56, , 2F
08/09 15:56, 2F
推
08/09 20:11, , 3F
08/09 20:11, 3F
討論串 (同標題文章)