File and fopen

I'm using FileChooser to select file on disk. FileChooser results are File objects and from them I can get filenames.

Problem is that many filenames contain characters with codes larger than 127 (Chineese, Cyrilic,...).

How can I get filenames that 'fopen' will understand?

Why not use:


Unfortunately this is not possible.

Then try (String::toWideCharPointer() with _wfopen()) or one of the relevant functions for your platform.


_wfopen is only available on Windows.

I found solution with short filenames and it seems to work.

String has a whole bunch of methods for getting character data out of it - for unixes you'd probably want to use something like myFile.getFullPathName().toRawUTF8()