libcdio  0.90
utf8.h
Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2008, 2012 Rocky Bernstein <rocky@gnu.org>
00003     Copyright (C) 2006 Burkhard Plaum <plaum@ipf.uni-stuttgart.de>
00004 
00005     This program is free software: you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation, either version 3 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017 */
00022 
00023 
00024 #include <cdio/types.h>
00025 
00029 typedef struct cdio_charset_coverter_s cdio_charset_coverter_t;
00030 
00037 cdio_charset_coverter_t *
00038 cdio_charset_converter_create(const char * src_charset,
00039                               const char * dst_charset);
00040 
00045 void cdio_charset_converter_destroy(cdio_charset_coverter_t*cnv);
00046 
00059 bool cdio_charset_convert(cdio_charset_coverter_t*cnv,
00060                           char * src, int src_len,
00061                           char ** dst, int * dst_len);
00062 
00075 bool cdio_charset_from_utf8(cdio_utf8_t * src, char ** dst,
00076                             int * dst_len, const char * dst_charset);
00077 
00091 bool cdio_charset_to_utf8(const char *src, size_t src_len, cdio_utf8_t **dst,
00092                           const char * src_charset);
00093 
00094 #ifdef _WIN32
00095 
00101 wchar_t* cdio_utf8_to_wchar(const char* str);
00102 
00103 #include <stdio.h> /* for FILE */
00107 FILE* fopen_utf8(const char* filename, const char* mode);
00108 #endif