]> mj.ucw.cz Git - libucw.git/blob - charset/mp-charconv.h
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#v3.8
[libucw.git] / charset / mp-charconv.h
1 /*
2  *      Sherlock Library -- Character Conversion with Allocation on a Memory Pool
3  *
4  *      (c) 2006 Pavel Charvat <pchar@ucw.cz>
5  *
6  *      This software may be freely distributed and used according to the terms
7  *      of the GNU Lesser General Public License.
8  */
9
10 #ifndef _CHARSET_MP_CHARCONV_H
11 #define _CHARSET_MP_CHARCONV_H
12
13 #include "lib/mempool.h"
14 #include "charset/charconv.h"
15
16 byte *mp_strconv(struct mempool *mp, byte *s, uns cs_in, uns cs_out);
17
18 static inline byte *
19 mp_strconv_to_utf8(struct mempool *mp, byte *s, uns cs_in)
20 { return mp_strconv(mp, s, cs_in, CONV_CHARSET_UTF8); }
21
22 static inline byte *
23 mp_strconv_from_utf8(struct mempool *mp, byte *s, uns cs_out)
24 { return mp_strconv(mp, s, CONV_CHARSET_UTF8, cs_out); }
25
26 #endif