From 1fa2f70f6ca8b5aa283aec260fde54e6edbaf005 Mon Sep 17 00:00:00 2001 From: René Korthaus Date: Wed, 28 Jun 2017 13:02:04 +0200 Subject: Fix transcoding of asn1print strings to UTF-8 When the terminal used supports UTF-8, asn1print should convert strings from internal Latin1 to UTF-8 encoding for printing to terminal. However, it previously tried to convert in the opposite direction, probably because of the misconception that Charset::transcode() expects the two encodings as "from, to" instead of "to, from". --- src/cli/asn1.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cli') diff --git a/src/cli/asn1.cpp b/src/cli/asn1.cpp index f24e2c316..1ed60258f 100644 --- a/src/cli/asn1.cpp +++ b/src/cli/asn1.cpp @@ -360,8 +360,8 @@ void decode(Botan::BER_Decoder& decoder, size_t level) { emit(type_name(type_tag), level, length, Botan::Charset::transcode(str.iso_8859(), - Botan::LATIN1_CHARSET, - Botan::UTF8_CHARSET)); + Botan::UTF8_CHARSET, + Botan::LATIN1_CHARSET)); } else { -- cgit v1.2.3