Kroko
July 9, 2015, 7:08pm
1
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?
Kroko
July 9, 2015, 9:09pm
3
Unfortunately this is not possible.
Then try http://www.juce.com/api/classString.html#ae79ca95309b6b8a7987e8b2f2efef297 (String::toWideCharPointer() with _wfopen()) or one of the relevant functions for your platform.
Rail
Kroko
July 10, 2015, 7:08am
5
_wfopen is only available on Windows.
I found solution with short filenames and it seems to work.
jules
July 10, 2015, 7:25am
6
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()