Geany dev
|
Encoding conversion and Byte Order Mark (BOM) handling. More...
Enumerations | |
enum | GeanyEncodingIndex |
List of known and supported encodings. | |
Functions | |
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. More... | |
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. More... | |
const gchar * | encodings_get_charset_from_index (gint idx) |
Gets the character set name of the specified index e.g. More... | |
Encoding conversion and Byte Order Mark (BOM) handling.
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.
buffer | the input string to convert. |
size | the length of the string, or -1 if the string is nul-terminated. |
used_encoding | (out) return location of the detected encoding of the input string, or NULL . |
g_free()
. Otherwise NULL
. 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.
If fast is not set, additional checks to validate the converted string are performed.
buffer | The input string to convert. |
size | The length of the string, or -1 if the string is nul-terminated. |
charset | The charset to be used for conversion. |
fast | TRUE to only convert the input and skip extended checks on the converted string. |
g_free()
. Otherwise NULL
. const gchar * encodings_get_charset_from_index | ( | gint | idx | ) |
Gets the character set name of the specified index e.g.
for use with document_set_encoding().
idx | GeanyEncodingIndex to retrieve the corresponding character set. |
NULL
if the index is invalid.