diff options
author | Jay Berkenbilt <ejb@ql.org> | 2019-01-05 19:13:16 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2019-01-06 05:01:44 +0100 |
commit | b341d742dbb69ef3cc827f06e4aaddfe67b18d0f (patch) | |
tree | 1bb2eb6a85aaf9a22cbf86894d6b148c974add72 /libtests/qutil.cc | |
parent | 3ef1b77304ec49ec2527d8cc3e17e1d0dd220720 (diff) | |
download | qpdf-b341d742dbb69ef3cc827f06e4aaddfe67b18d0f.tar.zst |
Add WinAnsi and MacRoman encoding
Diffstat (limited to 'libtests/qutil.cc')
-rw-r--r-- | libtests/qutil.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libtests/qutil.cc b/libtests/qutil.cc index 364eae1c..3779803c 100644 --- a/libtests/qutil.cc +++ b/libtests/qutil.cc @@ -229,6 +229,15 @@ void utf8_to_ascii_test() << std::endl << QUtil::utf8_to_ascii(input, '*') << std::endl; + std::string a = QUtil::utf8_to_win_ansi(input, '*'); + std::string b = QUtil::utf8_to_mac_roman(input, '*'); + std::cout + << "<" << QUtil::int_to_string_base( + static_cast<unsigned char>(a.at(0)), 16, 2) + << ">" << a.substr(1) << std::endl + << "<" << QUtil::int_to_string_base( + static_cast<unsigned char>(b.at(0)), 16, 2) + << ">" << b.substr(1) << std::endl; } void print_whoami(char const* str) |