src/unicode.h

Go to the documentation of this file.
00001 //
00002 // Unihan Input Method
00003 //
00004 // Copyright © 2002-2007 Sun Wah Linux Ltd.
00005 //
00006 //
00007 // This library is free software; you can redistribute it and/or modify
00008 // it under the terms of the GNU Lesser General Public License as
00009 // published by the Free Software Foundation; either version 2.1 of the
00010 // License, or (at your option) any later version.
00011 //
00012 // This library is distributed in the hope that it will be useful, but
00013 // WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 // Lesser General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU Lesser General Public
00018 // License along with this program; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00020 // USA
00021 //
00022 // $Id: unicode.h 793 2007-06-26 15:06:44Z roger $
00023 //
00024 
00025 #ifndef __UNICODE_H
00026 #define __UNICODE_H
00027 
00028 #include <iml/SunIM.h>
00029 
00030 typedef unsigned long UTF32CHAR;
00031 typedef unsigned char UTF8CHAR;
00032 
00033 const UTF8CHAR *utf8_next_char(const UTF8CHAR *in);
00034 UTFCHAR *utf8_to_utf16be(iml_session_t *s, const UTF8CHAR *utf8, unsigned int *num_chars);
00035 UTF32CHAR *utf8_to_utf32(iml_session_t *s, const UTF8CHAR *utf8, unsigned int *num_chars);
00036 UTF8CHAR *utf32_to_utf8(iml_session_t *s, const UTF32CHAR *utf32, unsigned int *num_chars);
00037 UTF8CHAR *utf16be_to_utf8(iml_session_t *s, const UTFCHAR *utf16, unsigned int *num_chars);
00038 
00039 #endif /* __UNICODE_H */
00040 
00041 // vi:ts=4:sw=4:nowrap:cin:expandtab

Generated on Fri Sep 7 15:51:41 2007 for unihan-core-le by  doxygen 1.5.2