summaryrefslogtreecommitdiff
path: root/libsi/si.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsi/si.h')
-rw-r--r--libsi/si.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/libsi/si.h b/libsi/si.h
index e70de685..c5f426ef 100644
--- a/libsi/si.h
+++ b/libsi/si.h
@@ -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