Fix Missing -z proto,colinfo,ip,gtp.teid_cp and -z proto,colinfo,ip,gtp.teid_data
[obnox/wireshark/wip.git] / epan / unicode-utils.h
1 /* unicode-utils.h
2  * Unicode utility definitions
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 2006 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 #ifndef __UNICODEUTIL_H__
26 #define __UNICODEUTIL_H__
27
28 #ifdef _WIN32
29
30 /**
31  * @file Unicode convenience routines.
32  */
33
34 /** Given a UTF-8 string, convert it to UTF-16.  This is meant to be used
35  * to convert between GTK+ 2.x (UTF-8) to Windows (UTF-16).
36  *
37  * @param utf8str The string to convert.  May be NULL.
38  * @return The string converted to UTF-16.  If utf8str is NULL, returns
39  * NULL.  The return value should NOT be freed by the caller.
40  */
41 wchar_t * utf_8to16(const char *utf8str);
42
43 /** Given a UTF-16 string, convert it to UTF-8.  This is meant to be used
44  * to convert between GTK+ 2.x (UTF-8) to Windows (UTF-16).
45  *
46  * @param utf16str The string to convert.  May be NULL.
47  * @return The string converted to UTF-8.  If utf16str is NULL, returns
48  * NULL.  The return value should NOT be freed by the caller.
49  */
50 gchar * utf_16to8(const wchar_t *utf16str);
51
52 #endif /* _WIN32 */
53
54 #endif /* __UNICODEUTIL_H__ */