summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_File_Chooser2.cxx9
-rw-r--r--src/fl_utf8.cxx10
2 files changed, 15 insertions, 4 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index d192f636e..eddbbb5d2 100644
--- a/src/Fl_File_Chooser2.cxx
+++ b/src/Fl_File_Chooser2.cxx
@@ -28,10 +28,11 @@
\image latex Fl_File_Chooser.jpg "Fl_File_Chooser" width=12cm
The Fl_File_Chooser widget transmits UTF-8 encoded filenames to its user. It is
- recommended to open files that may have non-ASCII names with the fl_fopen() utility
- function that handles these names in a cross-platform way (whereas the standard
- fopen() function fails on the MSWindows platform to open files with a non-ASCII name).
-
+ recommended to open files that may have non-ASCII names with the fl_fopen() or
+ fl_open() utility functions that handle these names in a cross-platform way
+ (whereas the standard fopen()/open() functions fail on the MSWindows platform
+ to open files with a non-ASCII name).
+
The Fl_File_Chooser class also exports several static values
that may be used to localize or customize the appearance of all file chooser
dialogs:
diff --git a/src/fl_utf8.cxx b/src/fl_utf8.cxx
index 3b2f9a553..c76a4b01e 100644
--- a/src/fl_utf8.cxx
+++ b/src/fl_utf8.cxx
@@ -518,6 +518,15 @@ char *fl_getenv(const char* v)
#endif
}
+/** Cross-platform function to open files with a UTF-8 encoded name.
+
+ This function is especially useful under the MSWindows platform where the
+ standard open() function fails with UTF-8 encoded non-ASCII filenames.
+ \param f the UTF-8 encoded filename
+ \param oflags other arguments are as in the standard open() function
+ \return a file descriptor upon successful completion, or -1 in case of error.
+ \sa fl_fopen().
+ */
int fl_open(const char* f, int oflags, ...)
{
int pmode;
@@ -548,6 +557,7 @@ int fl_open(const char* f, int oflags, ...)
\param f the UTF-8 encoded filename
\param mode same as the second argument of the standard fopen() function
\return a FILE pointer upon successful completion, or NULL in case of error.
+ \sa fl_open().
*/
FILE *fl_fopen(const char* f, const char *mode)
{