diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2020-05-14 21:21:03 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2020-05-14 21:21:03 +0200 |
commit | ab308bea3175dd21139b7b842b6de56bf88d8b1c (patch) | |
tree | 659da7cbc78052de88e65ba5ec40e444d612344f /libsi/si.h | |
parent | 5f3ad4fc9b179d96ed55136d3514643df90696d0 (diff) | |
download | vdr-ab308bea3175dd21139b7b842b6de56bf88d8b1c.tar.gz vdr-ab308bea3175dd21139b7b842b6de56bf88d8b1c.tar.bz2 |
Fixed handling multi part ExtendedEventDescriptors where only the first part contains information about the character table
Diffstat (limited to 'libsi/si.h')
-rw-r--r-- | libsi/si.h | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -6,7 +6,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: si.h 3.4 2015/02/10 13:54:28 kls Exp $ + * $Id: si.h 4.1 2020/05/14 21:21:03 kls Exp $ * * ***************************************************************************/ @@ -508,7 +508,10 @@ public: //so the maximum there is 256. //returns the given buffer for convenience. //The emphasis marks 0x86 and 0x87 are still available. - char *getText(char *buffer, int size); + //If fromCode is given, the string will be copied into buffer in its raw form, + //without conversion, and he code table of the string is returned in this variable + //if it is NULL. + char *getText(char *buffer, int size, const char **fromCode = NULL); //The same semantics as for getText(char*) apply. //The short version of the text according to ETSI TR 101 211 (chapter 4.6) //will be written into the shortVersion buffer (which should, therefore, have the same @@ -518,7 +521,7 @@ public: char *getText(char *buffer, char *shortVersion, int sizeBuffer, int sizeShortVersion); protected: virtual void Parse() {} - void decodeText(char *buffer, int size); + void decodeText(char *buffer, int size, const char **fromCode = NULL); void decodeText(char *buffer, char *shortVersion, int sizeBuffer, int sizeShortVersion); }; @@ -534,7 +537,9 @@ bool SetSystemCharacterTable(const char *CharacterTable); // default ISO6937 is returned. If a table can be determined, the buffer // and length are adjusted accordingly. const char *getCharacterTable(const unsigned char *&buffer, int &length, bool *isSingleByte = NULL); -bool convertCharacterTable(const char *from, size_t fromLength, char *to, size_t toLength, const char *fromCode); +// Copies 'from' to 'to' and converts characters according to 'fromCode', if given. +// Returns the length of the resulting string. +size_t convertCharacterTable(const char *from, size_t fromLength, char *to, size_t toLength, const char *fromCode); bool systemCharacterTableIsSingleByte(void); } //end of namespace |