Gammu internals  1.38.0
gammu-unicode.h
Go to the documentation of this file.
1 
7 #ifndef __gammu_unicode_h
8 #define __gammu_unicode_h
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
22 #include <wchar.h>
23 
24 #include <gammu-types.h>
25 #include <gammu-config.h>
26 
32 size_t UnicodeLength(const unsigned char *str);
33 
41 char *DecodeUnicodeString(const unsigned char *src);
42 
50 char *DecodeUnicodeConsole(const unsigned char *src);
51 
57 void DecodeUnicode(const unsigned char *src, char *dest);
58 
64 void EncodeUnicode(unsigned char *dest, const char *src, size_t len);
65 
71 void ReadUnicodeFile(unsigned char *Dest, const unsigned char *Source);
72 
78 void CopyUnicodeString(unsigned char *Dest, const unsigned char *Source);
79 
85 gboolean EncodeUTF8QuotedPrintable(char *dest, const unsigned char *src);
86 
92 void DecodeUTF8QuotedPrintable(unsigned char *dest, const char *src,
93  size_t len);
99 int EncodeWithUTF8Alphabet(unsigned long src, unsigned char *ret);
105 int DecodeWithUTF8Alphabet(const unsigned char *src, wchar_t * dest, size_t len);
106 
112 gboolean DecodeHexUnicode(unsigned char *dest, const char *src, size_t len);
113 
119 void EncodeHexUnicode(char *dest, const unsigned char *src, size_t len);
120 
126 gboolean mywstrncmp(unsigned const char *a, unsigned const char *b, int num);
127 
133 unsigned char *mywstrstr(unsigned const char *haystack,
134  unsigned const char *needle);
135 
141 gboolean mywstrncasecmp(unsigned const char *a, unsigned const char *b, int num);
142 
148 gboolean EncodeUTF8(char *dest, const unsigned char *src);
149 
155 void DecodeUTF8(unsigned char *dest, const char *src, size_t len);
156 
162 gboolean DecodeHexBin(unsigned char *dest, const unsigned char *src, size_t len);
163 
167 int EncodeWithUnicodeAlphabet(const unsigned char *value, wchar_t *dest);
168 
172 int DecodeWithUnicodeAlphabet(wchar_t value, unsigned char *dest);
173 #ifdef __cplusplus
174 }
175 #endif
176 #endif
177 
178 /* Editor configuration
179  * vim: noexpandtab sw=8 ts=8 sts=8 tw=72:
180  */
char * DecodeUnicodeConsole(const unsigned char *src)
Definition: coding.c:256
char * DecodeUnicodeString(const unsigned char *src)
Definition: coding.c:245
void CopyUnicodeString(unsigned char *Dest, const unsigned char *Source)
Definition: coding.c:1192
gboolean EncodeUTF8QuotedPrintable(char *dest, const unsigned char *src)
Definition: coding.c:1794
int DecodeWithUTF8Alphabet(const unsigned char *src, wchar_t *dest, size_t len)
Definition: coding.c:1866
gboolean mywstrncasecmp(unsigned const char *a, unsigned const char *b, int num)
Definition: coding.c:1437
size_t UnicodeLength(const unsigned char *str)
Definition: coding.c:186
void EncodeHexUnicode(char *dest, const unsigned char *src, size_t len)
Definition: coding.c:406
gboolean DecodeHexUnicode(unsigned char *dest, const char *src, size_t len)
Definition: coding.c:382
int gboolean
Definition: gammu-types.h:23
int EncodeWithUnicodeAlphabet(const unsigned char *value, wchar_t *dest)
Definition: coding.c:198
void DecodeUTF8QuotedPrintable(unsigned char *dest, const char *src, size_t len)
Definition: coding.c:1911
void EncodeUnicode(unsigned char *dest, const char *src, size_t len)
Definition: coding.c:301
void DecodeUTF8(unsigned char *dest, const char *src, size_t len)
Definition: coding.c:1947
gboolean mywstrncmp(unsigned const char *a, unsigned const char *b, int num)
Definition: coding.c:1457
unsigned char * mywstrstr(unsigned const char *haystack, unsigned const char *needle)
Definition: coding.c:1508
gboolean DecodeHexBin(unsigned char *dest, const unsigned char *src, size_t len)
Definition: coding.c:411
void DecodeUnicode(const unsigned char *src, char *dest)
Definition: coding.c:223
gboolean EncodeUTF8(char *dest, const unsigned char *src)
Definition: coding.c:1835
void ReadUnicodeFile(unsigned char *Dest, const unsigned char *Source)
Definition: coding.c:1227
int EncodeWithUTF8Alphabet(unsigned long src, unsigned char *ret)
Definition: coding.c:1752
int DecodeWithUnicodeAlphabet(wchar_t value, unsigned char *dest)
Definition: coding.c:210