vdr
2.2.0
|
#include <tools.h>
Public Member Functions | |
cCharSetConv (const char *FromCode=NULL, const char *ToCode=NULL) | |
~cCharSetConv () | |
const char * | Convert (const char *From, char *To=NULL, size_t ToLength=0) |
Static Public Member Functions | |
static const char * | SystemCharacterTable (void) |
static void | SetSystemCharacterTable (const char *CharacterTable) |
Private Attributes | |
iconv_t | cd |
char * | result |
size_t | length |
Static Private Attributes | |
static char * | systemCharacterTable = NULL |
cCharSetConv::cCharSetConv | ( | const char * | FromCode = NULL , |
const char * | ToCode = NULL |
||
) |
const char * cCharSetConv::Convert | ( | const char * | From, |
char * | To = NULL , |
||
size_t | ToLength = 0 |
||
) |
Converts the given Text from FromCode to ToCode (as set in the constructor).
If To is given, it is used to copy at most ToLength bytes of the result (including the terminating 0) into that buffer. If To is not given, the result is copied into a dynamically allocated buffer and is valid as long as this object lives, or until the next call to Convert(). The return value always points to the result if the conversion was successful (even if a fixed size To buffer was given and the result didn't fit into it). If the string could not be converted, the result points to the original From string.
Definition at line 955 of file tools.c.
References esyslog, and max().
Referenced by cSubtitleObject::DecodeCharacterString(), cMenuTimerItem::Set(), and SetSystemCharacterTable().
|
static |
Definition at line 932 of file tools.c.
References Convert(), SystemToUtf8, Utf8CharGet(), and Utf8CharLen().
Referenced by main().
|
inlinestatic |
Definition at line 164 of file tools.h.
References SI::SetSystemCharacterTable().
Referenced by cKbdRemote::cKbdRemote(), cSubtitleObject::DecodeCharacterString(), cFont::GetFontFileName(), cSVDRP::Process(), cMenuTimerItem::Set(), Utf8CharGet(), Utf8CharLen(), Utf8CharSet(), Utf8FromArray(), Utf8StrLen(), Utf8Strn0Cpy(), Utf8SymChars(), and Utf8ToArray().
|
staticprivate |
Definition at line 146 of file tools.h.
Referenced by Utf8FromArray().