[go: up one dir, main page]

Menu

[e0151d]: / src / ylocale.h  Maximize  Restore  History

Download this file

47 lines (36 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* IceWM - C++ wrapper for locale/unicode conversion
* Copyright (C) 2001 The Authors of IceWM
*
* Release under terms of the GNU Library General Public License
*/
#ifndef __YLOCALE_H
#define __YLOCALE_H
#ifdef CONFIG_I18N
#include <iconv.h>
#if defined(CONFIG_LIBICONV) && !defined (_LIBICONV_VERSION)
#error libiconv in use but included iconv.h not from libiconv
#endif
#if !defined(CONFIG_LIBICONV) && defined (_LIBICONV_VERSION)
#error libiconv not in use but included iconv.h is from libiconv
#endif
#endif
typedef char YLChar;
typedef wchar_t YUChar;
class YLocale {
public:
YLocale(char const * localeName = "");
~YLocale();
#ifdef CONFIG_I18N
static iconv_t getConverter (char const * from, char const **& to);
static YLChar * localeString(YUChar const * uStr, size_t const uLen,
size_t & lLen);
static YUChar * unicodeString(YLChar const * lStr, size_t const lLen,
size_t & uLen);
private:
static YLocale * locale;
iconv_t toUnicode;
iconv_t toLocale;
#endif
};
#endif