UTF-8 support (PDF 2.0 compliance) and ProcedureSets (for compatibility)

This commit is contained in:
Jakub Melka
2020-08-02 15:29:10 +02:00
parent fa30ed37bb
commit a2c5de0fe4
4 changed files with 89 additions and 4 deletions

View File

@ -105,11 +105,18 @@ public:
static const encoding::EncodingTable* getTableForEncoding(Encoding encoding);
private:
/// Returns true, if byte array has UTF-16BE unicode marking bytes at the
/// Returns true, if byte array has UTF-16BE/LE unicode marking bytes at the
/// stream start. If they are present, then byte stream is probably encoded
/// as unicode.
/// \param stream Stream to be tested
static bool hasUnicodeLeadMarkings(const QByteArray& stream);
/// Returns true, if byte array has UTF-8 unicode marking bytes at the stream
/// start. If they are present, then byte stream is probably encoded
/// as UTF-8 string.
/// \note UTF-8 strings were added in PDF 2.0 specification
/// \param stream Stream to be tested
static bool hasUTF8LeadMarkings(const QByteArray& stream);
};
} // namespace pdf