]> git.sesse.net Git - vlc/blob - include/charset.h
* i18n_strtod: locale-agnostic strtod() (accepts both comma and dot as decimal separ...
[vlc] / include / charset.h
1 /*****************************************************************************
2  * charset.h: Determine a canonical name for the current locale's character encoding.
3  *****************************************************************************
4  * Copyright (C) 2003-2005 the VideoLAN team
5  * $Id$
6  *
7  * Author: Derk-Jan Hartman <thedj at users.sourceforge.net>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef __VLC_CHARSET_H
25 #define __VLC_CHARSET_H 1
26
27 # ifdef __cplusplus
28 extern "C" {
29 # endif
30
31 VLC_EXPORT( vlc_bool_t, vlc_current_charset, ( char ** ) );
32 VLC_EXPORT( void, LocaleFree, ( const char * ) );
33 VLC_EXPORT( char *, FromLocale, ( const char * ) );
34 VLC_EXPORT( char *, FromLocaleDup, ( const char * ) );
35 VLC_EXPORT( char *, ToLocale, ( const char * ) );
36
37 VLC_EXPORT( FILE *, utf8_fopen, ( const char *filename, const char *mode ) );
38 VLC_EXPORT( void *, utf8_opendir, ( const char *dirname ) );
39 VLC_EXPORT( const char *, utf8_readdir, ( void *dir ) );
40 VLC_EXPORT( int, utf8_stat, ( const char *filename, void *buf ) );
41 VLC_EXPORT( int, utf8_lstat, ( const char *filename, void *buf ) );
42 VLC_EXPORT( int, utf8_mkdir, ( const char *filename ) );
43
44 #ifndef __PLUGIN__
45 int utf8_fprintf( FILE *, const char *, ... );
46 #endif
47
48 VLC_EXPORT( char *, EnsureUTF8, ( char * ) );
49 VLC_EXPORT( char *, FromUTF32, ( const wchar_t * ) );
50 VLC_EXPORT( char *, __vlc_fix_readdir_charset, ( vlc_object_t *, const char * ) );
51 #define vlc_fix_readdir_charset(a,b) __vlc_fix_readdir_charset(VLC_OBJECT(a),b)
52
53 extern double i18n_strtod( const char *, char ** );
54 extern double i18n_atof( const char * );
55 extern double us_strtod( const char *, char ** );
56 extern double us_atof( const char * );
57
58 # ifdef __cplusplus
59 }
60 # endif
61
62 #endif