I'm developing an application in MinGW/C++ that uses Windows' common dialogs. The need has arisen to collect a file name that might have non-ASCII characters in it. Is there a flag or another option for retrieving a file name in Unicode, or preferably UTF-8?
Asked
Active
Viewed 1,115 times
1 Answers
3
Call GetOpenFileNameW. You can do this without converting your entire app to Unicode which may be the most expedient solution.
Windows API comes in 2 flavours, ANSI and Unicode. The former has functions with an A suffix. The latter have a W suffix. You are currently using the former.

David Heffernan
- 601,492
- 42
- 1,072
- 1,490
-
I.e. `GetOpenFileName` is really a macro, and expands to `GetOpenFileNameA` by default. – MSalters Apr 29 '11 at 07:48