diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QUtil.hh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh index 5532149c..c7473bf3 100644 --- a/include/qpdf/QUtil.hh +++ b/include/qpdf/QUtil.hh @@ -152,8 +152,14 @@ namespace QUtil QPDF_DLL std::string toUTF16(unsigned long uval); - // Convert a UTF-8 encoded string to ASCII by replacing all - // characters outside of ascii with the given unknown_char. + // Convert a UTF-8 encoded string to UTF-16. Unrepresentable code + // points are converted to U+FFFD. + QPDF_DLL + std::string utf8_to_utf16(std::string const& utf8); + + // Convert a UTF-8 encoded string to the specified single-byte + // encoding system by replacing all unsupported characters with + // the given unknown_char. QPDF_DLL std::string utf8_to_ascii( std::string const& utf8, char unknown_char = '?'); |