libcdio  0.93
utf8.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008, 2012, 2014 Rocky Bernstein <rocky@gnu.org>
3  Copyright (C) 2006 Burkhard Plaum <plaum@ipf.uni-stuttgart.de>
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
22 
23 
24 #include <cdio/types.h>
25 
29 typedef struct cdio_charset_coverter_s cdio_charset_coverter_t;
30 
38 cdio_charset_converter_create(const char * src_charset,
39  const char * dst_charset);
40 
46 
60  char * src, int src_len,
61  char ** dst, int * dst_len);
62 
77 bool cdio_charset_from_utf8(cdio_utf8_t * src, char ** dst,
78  int * dst_len, const char * dst_charset);
79 
95 bool cdio_charset_to_utf8(const char *src, size_t src_len, cdio_utf8_t **dst,
96  const char * src_charset);
97 
98 #ifdef _WIN32
99 
105 wchar_t* cdio_utf8_to_wchar(const char* str);
106 
107 #include <stdio.h> /* for FILE */
111 FILE* fopen_utf8(const char* filename, const char* mode);
112 #endif
Common type definitions used pervasively in libcdio.
bool cdio_charset_from_utf8(cdio_utf8_t *src, char **dst, int *dst_len, const char *dst_charset)
Convert a string from UTF-8 to another charset.
cdio_charset_coverter_t * cdio_charset_converter_create(const char *src_charset, const char *dst_charset)
Create a charset converter.
void cdio_charset_converter_destroy(cdio_charset_coverter_t *cnv)
Destroy a characterset converter.
bool cdio_charset_to_utf8(const char *src, size_t src_len, cdio_utf8_t **dst, const char *src_charset)
Convert a string from another charset to UTF-8.
char cdio_utf8_t
UTF-8 char definition.
Definition: types.h:233
bool cdio_charset_convert(cdio_charset_coverter_t *cnv, char *src, int src_len, char **dst, int *dst_len)
Convert a string from one character set to another.
struct cdio_charset_coverter_s cdio_charset_coverter_t
Opaque characterset converter.
Definition: utf8.h:29