Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Windows 的常用对话框在 MinGW/C++ 中开发一个应用程序。需要收集其中可能包含非 ASCII 字符的文件名。是否有用于检索 Unicode 或 UTF-8 文件名的标志或其他选项?
调用 GetOpenFileNameW。您可以在不将整个应用程序转换为 Unicode 的情况下执行此操作,这可能是最方便的解决方案。
Windows API 有 2 种风格,ANSI 和 Unicode。前者具有带 A 后缀的功能。后者有一个 W 后缀。您当前使用的是前者。