CharacterSet.getCodeset

Gets the character set for the current locale.

class CharacterSet
static
string
getCodeset
()

Return Value

Type: string

a newly allocated string containing the name of the character set. This string must be freed with g_free(). [2] Note that some encodings may allow nul bytes to occur inside strings. In that case, using -1 for the len parameter is unsafe. [3] Despite the fact that byes_read can return information about partial characters, the g_convert_... functions are not generally suitable for streaming. If the underlying converter being used maintains internal state, then this won't be preserved across successive calls to g_convert(), g_convert_with_iconv() or g_convert_with_fallback(). (An example of this is the GNU C converter for CP1255 which does not emit a base character until it knows that the next character is not a mark that could combine with the base character.)

Meta