> I am having a problem with drag and drop filenames in fltk2.  Basically, it 
> seems the strings I get are utf8 as they contain Spanish accents (and they 
> show fine in any fltk window like fltk::alert).
> However, when I pass the string to fopen(), it fails to open the file.
> I'm wondering what is the right behavior here?  Should I use utf8toa to 
> convert the string?  Should I use a version of fopen for utf8 (how? which 
> function?).
>

I presume you are using the MSWindows platform.
You should use the
FILE* fl_fopen(const char*fname, const char*mode);
function after including <FL/Fl.H>.
On MSWindows, this function transforms UTF-8 into UTF-16 and
then calls _wfopen(). On other platforms, it just calls fopen().

This is not really an issue with filename drag-n-drop. It should occur
equally with Fl_File_Chooser and Fl_Native_File_Chooser.

I realize the documentation lacks on this important subject.
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to