NetSurf
utf8.h
Go to the documentation of this file.
1/*
2 * Copyright 2014 Vincent Sanders <vince@netsurf-browser.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/**
20 * \file
21 *
22 * Interface to platform-specific utf8 operations.
23 */
24
25#ifndef _NETSURF_UTF8_H_
26#define _NETSURF_UTF8_H_
27
28/**
29 * User interface utf8 characterset conversion routines.
30 */
32 /**
33 * Convert a UTF-8 encoded string into the system local encoding
34 *
35 * \param string The string to convert
36 * \param len The length (in bytes) of the string, or 0
37 * \param result Pointer to location in which to store result
38 * \return An nserror code
39 */
40 nserror (*utf8_to_local)(const char *string, size_t len, char **result);
41
42 /**
43 * Convert a string encoded in the system local encoding to UTF-8
44 *
45 * \param string The string to convert
46 * \param len The length (in bytes) of the string, or 0
47 * \param result Pointer to location in which to store result
48 * \return An nserror code
49 */
50 nserror (*local_to_utf8)(const char *string, size_t len, char **result);
51};
52
53#endif
STATIC char result[100]
Definition: arexx.c:77
nserror
Enumeration of error codes.
Definition: errors.h:29
User interface utf8 characterset conversion routines.
Definition: utf8.h:31
nserror(* local_to_utf8)(const char *string, size_t len, char **result)
Convert a string encoded in the system local encoding to UTF-8.
Definition: utf8.h:50
nserror(* utf8_to_local)(const char *string, size_t len, char **result)
Convert a UTF-8 encoded string into the system local encoding.
Definition: utf8.h:40