From 0e13e907ced9981024d0bdec7e2dc1b2081c9cbe Mon Sep 17 00:00:00 2001 From: Rod Smith Date: Fri, 15 Mar 2024 22:51:05 -0400 Subject: Fixed bug in display of Unicode characters greater than 0x10000 --- NEWS | 6 ++++++ gptpart.cc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 1eea0fe..cfee080 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +1.0.11 (?/??/202?): +------------------- + +- Fixed bug that caused Unicode characters greater than 0x10000 to be + displayed incorrectly. Fix courtesy of Ulrich Müller. + 1.0.10 (2/19/2024): ------------------- diff --git a/gptpart.cc b/gptpart.cc index 5fe7b5a..78f1206 100644 --- a/gptpart.cc +++ b/gptpart.cc @@ -131,7 +131,7 @@ string GPTPart::GetDescription(void) { } // if else { utf8 += (char) ( 0xf0 | ( uni >> 18 ) ) ; - utf8 += (char) ( 0xe0 | ( ( uni >> 12 ) & 0x3f ) ) ; + utf8 += (char) ( 0x80 | ( ( uni >> 12 ) & 0x3f ) ) ; utf8 += (char) ( 0x80 | ( ( uni >> 6 ) & 0x3f ) ) ; utf8 += (char) ( 0x80 | ( uni & 0x3f ) ) ; } // if -- cgit v1.2.3