aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2017-06-28 13:02:04 +0200
committerRenĂ© Korthaus <[email protected]>2017-06-28 13:02:04 +0200
commit1fa2f70f6ca8b5aa283aec260fde54e6edbaf005 (patch)
treeef385cb96961c1aeee80e25af7f0976640a7322f /src/cli
parent62c94693cb1cf5ddc5e8e43a787561e7d8351258 (diff)
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".
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/asn1.cpp4
1 files changed, 2 insertions, 2 deletions
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
{