Character encoding issues with file dialog API and Windows

Issue #2 resolved
Aggelos Kolaitis created an issue

Under modern Windows systems, the current File Dialog API has a faulty desing:

Because directories are passed as arguments of type char*, it is bound to fail when Unicode characters are present. Linux and Mac OS X systems mostly have little trouble.

This is noted here, however I still am not certain how to overcome this issue. Should the whole API ditch char and use w_char ? Something else? Currently, because of this the library fails to compile. Shortly, a fix will be pushed, which disables Unicode support for Windows, until a better solution is proposed.

Comments (2)

  1. Aggelos Kolaitis reporter

    Update: Two version of the file dialog API exist now, SDLU_FileDialog() and SDLU_FileDialogW(). Under Windows systems, they will use the appropriate ANSI or UNICODE Win32 functions. It is the user of the API who should decide whether he wants to use char or wchar_t. Both options work in exactly the same way.

  2. Log in to comment