summaryrefslogtreecommitdiff
path: root/src/cairoint.h
diff options
context:
space:
mode:
authorTom Schoonjans <Tom.Schoonjans@diamond.ac.uk>2017-11-02 16:55:22 +0000
committerAdrian Johnson <ajohnson@redneon.com>2017-11-26 20:16:43 +1030
commit84fc0ce91d1a57d20500f710abc0e17de82c67df (patch)
tree34acae66eba9dd6051787cc4717232a9144f592f /src/cairoint.h
parente5532f5ad7f5493d703f9a7110b0816b5fa33e54 (diff)
downloadcairo-84fc0ce91d1a57d20500f710abc0e17de82c67df.tar.gz
Use UTF-8 filenames on Windows
Until now fopen was used on Windows to open files for reading and writing. This assumed however that the filename would be encoded in the current codepage, which is a major inconvenience and makes it even impossible to use filenames that use characters from more than one codepage. This patch enforces the use of UTF-8 filenames on all platforms. Based on the work of Owen Taylor (https://lists.cairographics.org/archives/cairo/2007-February/009591.html)
Diffstat (limited to 'src/cairoint.h')
-rw-r--r--src/cairoint.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cairoint.h b/src/cairoint.h
index c44242a6c..154270656 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -1922,6 +1922,10 @@ _cairo_matrix_multiply (cairo_matrix_t *r,
cairo_private void
_cairo_observers_notify (cairo_list_t *observers, void *arg);
+/* Open a file with a UTF-8 filename */
+cairo_private cairo_status_t
+_cairo_fopen (const char *filename, const char *mode, FILE **file_out);
+
/* Avoid unnecessary PLT entries. */
slim_hidden_proto (cairo_clip_preserve);
slim_hidden_proto (cairo_close_path);