ExifTool read Chinese File Name issue

TOC

Problem

As Title

Solution

exiftool -charset filename=utf8 full_path_filename_utf8

void testExifTool()
{
    std::wstring testFile = L"h:\\\\myproject\\lomoware\\lomo-win\\output\\Release\\Lomoagent\\lomod\\ffmpeg\\W中文en.jpg";
    std::wstring exifTool = L"h:\\myproject\\lomoware\\lomo-win\\output\\Release\\Lomoagent\\lomod\\ffmpeg\\exiftool.exe";

    std::string testFileUTF8 = WToUtf8(testFile);
    std::string exifToolUTF8 = WToUtf8(exifTool);

    std::string utfCmd = exifToolUTF8 + " -charset filename=utf8 " + testFileUTF8;

    void* handle;
    int pid;
    launchChildProcessA(utfCmd, handle, pid, true);
}
0

Leave a Reply

Your email address will not be published. Required fields are marked *