Main Page | File List | File Members

librcd.h

Go to the documentation of this file.
00001 #ifndef _LIBRCD_H
00002 #define _LIBRCD_H
00003 
00004 #ifdef __cplusplus
00005 extern "C" {
00006 #endif
00007 
00008 enum rcd_russian_charset_t {
00009     RUSSIAN_CHARSET_WIN = 0,
00010     RUSSIAN_CHARSET_KOI,
00011     RUSSIAN_CHARSET_UTF8,
00012     RUSSIAN_CHARSET_ALT
00013 };
00014 typedef enum rcd_russian_charset_t rcd_russian_charset;
00015 
00016 
00017 /*
00018 rcdGetRussianCharset
00019     Detects encoding of russian text passed in buf variable. Support 
00020     UTF-8, CP1251, CP866 and KOI8-R encoding.
00021     
00022     buf         String with russian texts
00023     len         Number of bytes to use from buf. If zero is passed determined 
00024                 by strlen.
00025     
00026     Returns:
00027         0 - CP1251
00028         1 - KOI8-R
00029         2 - UTF8
00030         3 - CP866
00031 */
00032 
00033 rcd_russian_charset rcdGetRussianCharset(const char *buf, int len);
00034 
00035 #ifdef __cplusplus
00036 }
00037 #endif
00038 
00039 /* Backward compatibility */
00040 #ifndef _LIBRCD_C
00041 # define russian_charsets rcd_russian_charset_t
00042 # define get_russian_charset rcdGetRussianCharset
00043 #endif /* ! _LIBRCD_C */
00044 
00045 #endif /* _LIBRCD_H */

Generated on Wed Jul 20 15:19:45 2005 for LibRCC by doxygen 1.3.3