From a16ba22f1ae010a125e574a437979af2da8e3195 Mon Sep 17 00:00:00 2001 From: Liang Chang Date: Tue, 16 Nov 2021 05:55:37 +0800 Subject: [PATCH] DtMmdb: add UTF-8 encoding for nbsp. --- cde/programs/dtinfo/DtMmdb/StyleSheet/DocParser.C | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cde/programs/dtinfo/DtMmdb/StyleSheet/DocParser.C b/cde/programs/dtinfo/DtMmdb/StyleSheet/DocParser.C index 79dc9c20f..6579e06fc 100644 --- a/cde/programs/dtinfo/DtMmdb/StyleSheet/DocParser.C +++ b/cde/programs/dtinfo/DtMmdb/StyleSheet/DocParser.C @@ -652,7 +652,10 @@ DocParser::read_data(istream &input, ostringstream &output) c = '&' ; else if (!strcmp(tmpbuf, "nbsp")) // non-break space - c = (char)0xA0 ; + { + if (MB_CUR_MAX > 1) output << 0xC2; + c = (char)0xA0; + } else c = ' ';