diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2008-08-02 20:39:03 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2008-08-02 20:39:03 +0000 |
commit | 02103a2fa701954e42c8081fccf75eea26f52ce8 (patch) | |
tree | 8055c7c0b7e3fa710e07a19928ec8c46d6a08d1d /apps/misc.h | |
parent | 6485d6d3ba999e8cacde267a30c8415959fcfc79 (diff) | |
download | rockbox-02103a2fa701954e42c8081fccf75eea26f52ce8.tar.gz rockbox-02103a2fa701954e42c8081fccf75eea26f52ce8.zip |
Unify opening of utf-8 files (FS#6203). This also adds ignoring the BOM in several places it has been missing (as FS#6071).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18185 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/misc.h')
-rw-r--r-- | apps/misc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/misc.h b/apps/misc.h index 160d74473f..b5547ec38f 100644 --- a/apps/misc.h +++ b/apps/misc.h @@ -23,6 +23,10 @@ #include <stdbool.h> #include <inttypes.h> + +#define BOM "\xef\xbb\xbf" +#define BOM_SIZE 3 + /* Format a large-range value for output, using the appropriate unit so that * the displayed value is in the range 1 <= display < 1000 (1024 for "binary" * units) if possible, and 3 significant digits are shown. If a buffer is @@ -106,6 +110,8 @@ extern int show_logo(void); int get_replaygain_mode(bool have_track_gain, bool have_album_gain); #endif +int open_utf8(const char* pathname, int flags); + #ifdef BOOTFILE #if !defined(USB_NONE) && !defined(USB_IPODSTYLE) void check_bootfile(bool do_rolo); |