geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

encodings.h
Go to the documentation of this file.
1/*
2 * encodings.h - this file is part of Geany, a fast and lightweight IDE
3 *
4 * Copyright 2005 The Geany contributors
5 *
6 * This program 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; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21
22/**
23 * @file encodings.h
24 * Encoding conversion and Byte Order Mark (BOM) handling.
25 **/
26
27/*
28 * Modified by the gedit Team, 2002. See the gedit AUTHORS file for a
29 * list of people on the gedit Team.
30 * See the gedit ChangeLog files for a list of changes.
31 */
32
33 /* Stolen from anjuta */
34
35#ifndef GEANY_ENCODINGS_H
36#define GEANY_ENCODINGS_H 1
37
38#include "gtkcompat.h"
39
40G_BEGIN_DECLS
41
42/*
43 * The original versions of the following tables are taken from profterm
44 *
45 * Copyright (C) 2002 Red Hat, Inc.
46 */
47
48/** List of known and supported encodings. */
49typedef enum
50{
66
75
80
84
90
97
104
110
120
123
127
128gchar *encodings_convert_to_utf8(const gchar *buffer, gssize size, gchar **used_encoding);
129
130/* Converts a string from the given charset to UTF-8.
131 * If fast is set, no further checks are performed. */
132gchar *encodings_convert_to_utf8_from_charset(const gchar *buffer, gssize size,
133 const gchar *charset, gboolean fast);
134
135const gchar* encodings_get_charset_from_index(gint idx);
136
137G_END_DECLS
138
139#endif /* GEANY_ENCODINGS_H */
gchar * encodings_convert_to_utf8_from_charset(const gchar *buffer, gssize size, const gchar *charset, gboolean fast)
Tries to convert buffer into UTF-8 encoding from the encoding specified with charset.
Definition: encodings.c:625
GeanyEncodingIndex
List of known and supported encodings.
Definition: encodings.h:50
@ GEANY_ENCODING_UTF_32BE
Definition: encodings.h:74
@ GEANY_ENCODING_ISO_8859_6
Definition: encodings.h:56
@ GEANY_ENCODING_UCS_2LE
Definition: encodings.h:71
@ GEANY_ENCODING_ISO_8859_14
Definition: encodings.h:63
@ GEANY_ENCODING_BIG5_HKSCS
Definition: encodings.h:78
@ GEANY_ENCODING_UTF_7
Definition: encodings.h:67
@ GEANY_ENCODING_IBM_855
Definition: encodings.h:93
@ GEANY_ENCODING_ISO_8859_8
Definition: encodings.h:58
@ GEANY_ENCODING_GB2312
Definition: encodings.h:86
@ GEANY_ENCODING_ISO_8859_1
Definition: encodings.h:51
@ GEANY_ENCODING_ISO_2022_KR
Definition: encodings.h:99
@ GEANY_ENCODING_WINDOWS_1254
Definition: encodings.h:115
@ GEANY_ENCODING_ISO_IR_111
Definition: encodings.h:100
@ GEANY_ENCODING_BIG5
Definition: encodings.h:77
@ GEANY_ENCODING_CP_866
Definition: encodings.h:79
@ GEANY_ENCODING_IBM_850
Definition: encodings.h:91
@ GEANY_ENCODING_ISO_8859_4
Definition: encodings.h:54
@ GEANY_ENCODING_EUC_KR
Definition: encodings.h:82
@ GEANY_ENCODING_SHIFT_JIS
Definition: encodings.h:105
@ GEANY_ENCODING_IBM_852
Definition: encodings.h:92
@ GEANY_ENCODING_JOHAB
Definition: encodings.h:101
@ GEANY_ENCODING_WINDOWS_1253
Definition: encodings.h:114
@ GEANY_ENCODING_ISO_8859_7
Definition: encodings.h:57
@ GEANY_ENCODING_IBM_857
Definition: encodings.h:94
@ GEANY_ENCODING_WINDOWS_1251
Definition: encodings.h:112
@ GEANY_ENCODINGS_MAX
Definition: encodings.h:124
@ GEANY_ENCODING_UTF_8
Definition: encodings.h:68
@ GEANY_ENCODING_UTF_32LE
Definition: encodings.h:73
@ GEANY_ENCODING_ISO_8859_5
Definition: encodings.h:55
@ GEANY_ENCODING_ISO_8859_2
Definition: encodings.h:52
@ GEANY_ENCODING_UTF_16LE
Definition: encodings.h:69
@ GEANY_ENCODING_GBK
Definition: encodings.h:87
@ GEANY_ENCODING_VISCII
Definition: encodings.h:109
@ GEANY_ENCODING_ISO_8859_9
Definition: encodings.h:60
@ GEANY_ENCODING_ISO_8859_16
Definition: encodings.h:65
@ GEANY_ENCODING_TCVN
Definition: encodings.h:106
@ GEANY_ENCODING_EUC_TW
Definition: encodings.h:83
@ GEANY_ENCODING_WINDOWS_1256
Definition: encodings.h:117
@ GEANY_ENCODING_ISO_8859_3
Definition: encodings.h:53
@ GEANY_ENCODING_ISO_8859_13
Definition: encodings.h:62
@ GEANY_ENCODING_IBM_864
Definition: encodings.h:96
@ GEANY_ENCODING_TIS_620
Definition: encodings.h:107
@ GEANY_ENCODING_ISO_2022_JP
Definition: encodings.h:98
@ GEANY_ENCODING_GEOSTD8
Definition: encodings.h:88
@ GEANY_ENCODING_ISO_8859_10
Definition: encodings.h:61
@ GEANY_ENCODING_GB18030
Definition: encodings.h:85
@ GEANY_ENCODING_WINDOWS_1257
Definition: encodings.h:118
@ GEANY_ENCODING_NONE
Definition: encodings.h:121
@ GEANY_ENCODING_ARMSCII_8
Definition: encodings.h:76
@ GEANY_ENCODING_KOI8_U
Definition: encodings.h:103
@ GEANY_ENCODING_UHC
Definition: encodings.h:108
@ GEANY_ENCODING_EUC_JP
Definition: encodings.h:81
@ GEANY_ENCODING_WINDOWS_1252
Definition: encodings.h:113
@ GEANY_ENCODING_WINDOWS_1258
Definition: encodings.h:119
@ GEANY_ENCODING_CP_932
Definition: encodings.h:122
@ GEANY_ENCODING_UTF_16BE
Definition: encodings.h:70
@ GEANY_ENCODING_HZ
Definition: encodings.h:89
@ GEANY_ENCODING_WINDOWS_1255
Definition: encodings.h:116
@ GEANY_ENCODING_WINDOWS_1250
Definition: encodings.h:111
@ GEANY_ENCODING_IBM_862
Definition: encodings.h:95
@ GEANY_ENCODING_ISO_8859_15
Definition: encodings.h:64
@ GEANY_ENCODING_KOI8_R
Definition: encodings.h:102
@ GEANY_ENCODING_UCS_2BE
Definition: encodings.h:72
@ GEANY_ENCODING_ISO_8859_8_I
Definition: encodings.h:59
const gchar * encodings_get_charset_from_index(gint idx)
Gets the character set name of the specified index e.g.
Definition: encodings.c:267
gchar * encodings_convert_to_utf8(const gchar *buffer, gssize size, gchar **used_encoding)
Tries to convert buffer into UTF-8 encoding and store the detected original encoding in used_encoding...
Definition: encodings.c:784