/rusxmms/librcd

To get this branch, use:
bzr branch http://suren.me/webbzr/rusxmms/librcd

« back to all changes in this revision

Viewing changes to src/librcd.h

  • Committer: Suren A. Chilingaryan
  • Date: 2005-06-16 23:19:27 UTC
  • Revision ID: Arch-1:ds@dside.dyndns.org--darksoft-2004%librcd--main--0.1--base-0
initial import

(automatically generated log message)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _LIBRCD_H
 
2
#define _LIBRCD_H
 
3
 
 
4
#ifdef __cplusplus
 
5
extern "C" {
 
6
#endif
 
7
 
 
8
enum russian_charsets {
 
9
    RUSSIAN_CHARSET_WIN = 0,
 
10
    RUSSIAN_CHARSET_KOI,
 
11
    RUSSIAN_CHARSET_UTF8,
 
12
    RUSSIAN_CHARSET_ALT
 
13
};
 
14
 
 
15
 
 
16
/*
 
17
get_russian_charset
 
18
    Detects encoding of russian text passed in buf variable. Support 
 
19
    UTF-8, CP1251, CP866 and KOI8-R encoding.
 
20
    
 
21
    buf         String with russian texts
 
22
    len         Number of bytes to use from buf. If zero is passed determined 
 
23
                by strlen.
 
24
    
 
25
    Returns:
 
26
        0 - CP1251
 
27
        1 - KOI8-R
 
28
        2 - UTF8
 
29
        3 - CP866
 
30
*/
 
31
 
 
32
enum russian_charsets get_russian_charset(const char *buf,int len);
 
33
 
 
34
#ifdef __cplusplus
 
35
}
 
36
#endif
 
37
 
 
38
#endif /* _LIBRCD_H */