Как читать и печатать пути к файлам с символами/символами Юникода?C++

Программы на C++. Форум разработчиков
Ответить Пред. темаСлед. тема
Anonymous
 Как читать и печатать пути к файлам с символами/символами Юникода?

Сообщение Anonymous »


I have no issues reading file paths with ASCII characters but have issues reading file paths with Unicode characters. I have tried to ensure that the code is correctly encoded to support unicode characters but it still doesnt work. How do i read the paths of the files and folders that have unicode characters or symbols?
#include #include #include #include #include #include // Function to list files in BFS order void ListFilesBFS(const std::wstring& inputDirectoryPath, std::wofstream& out) { std::queue pathsQueue; pathsQueue.push(inputDirectoryPath); // Loop until all directories have been processed while (!pathsQueue.empty()) { // Get the current directory path from the front of the queue std::wstring currentPath = pathsQueue.front(); pathsQueue.pop(); // Find the first file or directory in the current directory WIN32_FIND_DATAW findFileData; HANDLE hFind = FindFirstFileW((currentPath + L"\\*").c_str(), &findFileData); if (hFind == INVALID_HANDLE_VALUE) { // If unable to traverse the directory, print error and continue to next iteration std::wcerr

Источник: https://stackoverflow.com/questions/781 ... rs-symbols
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Как прочитать изображение по пути с символами Юникода?
    Anonymous » » в форуме Python
    0 Ответы
    22 Просмотры
    Последнее сообщение Anonymous
  • Php 7. Преобразование строки Юникода в символ Юникода #emoji
    Anonymous » » в форуме Php
    0 Ответы
    49 Просмотры
    Последнее сообщение Anonymous
  • Python: символы Юникода 16.0 и Юникода 15.1.
    Anonymous » » в форуме Python
    0 Ответы
    20 Просмотры
    Последнее сообщение Anonymous
  • Python: символы Юникода 16.0 и Юникода 15.1.
    Anonymous » » в форуме Python
    0 Ответы
    12 Просмотры
    Последнее сообщение Anonymous
  • Python: символы Юникода 16.0 и Юникода 15.1.
    Anonymous » » в форуме Python
    0 Ответы
    19 Просмотры
    Последнее сообщение Anonymous

Вернуться в «C++»