From e4c2e456a3ab78ebb4ae3a7d35927eaf5bd15179 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 10 Dec 2021 22:52:27 -0600 Subject: [PATCH] Update: Keep original value when printing error while converting from Unicode codepoint string. --- level_3/utf8/c/private-print.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/level_3/utf8/c/private-print.c b/level_3/utf8/c/private-print.c index 42d6da5..8e87d65 100644 --- a/level_3/utf8/c/private-print.c +++ b/level_3/utf8/c/private-print.c @@ -18,7 +18,10 @@ extern "C" { if (!character.used) return; - if (data->mode & utf8_mode_to_binary_d) { + if (data->mode & utf8_mode_from_codepoint_d) { + fl_print_format("%s%[%Q%]%s", data->file.stream, data->prepend, set, character, set, data->append); + } + else if (data->mode & utf8_mode_to_binary_d) { fl_print_format("%s%[%r%]%s", data->file.stream, data->prepend, set, character, set, data->append); } else { -- 1.8.3.1