summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-11 17:11:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-11 17:11:38 +0200
commit12ec109de01c31605cf412612903190e469be8ff (patch)
treefeabf69adf98d90c04c919b83796b4cf2510c8ac /svtools
parent583ac140dcf6f11b21bc9c52516ba2bbcbd37a95 (diff)
Comment about state of non-BMP Unicode chars in RTF
Change-Id: I90051425c52f42f69cd61436979a50b875cca710
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/svrtf/rtfout.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/svtools/source/svrtf/rtfout.cxx b/svtools/source/svrtf/rtfout.cxx
index 62979aab13be..f64c3c8b8823 100644
--- a/svtools/source/svrtf/rtfout.cxx
+++ b/svtools/source/svrtf/rtfout.cxx
@@ -46,6 +46,14 @@ SvStream& Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen )
return rStream.WriteCharPtr( pStr );
}
+// Ideally, this function should work on (sal_uInt32) Unicode scalar values
+// instead of (sal_Unicode) UTF-16 code units. However, at least "Rich Text
+// Format (RTF) Specification Version 1.9.1" available at
+// <https://www.microsoft.com/en-us/download/details.aspx?id=10725> does not
+// look like it allows non-BMP Unicode characters >= 0x10000 in the \uN notation
+// (it only talks about "Unicode character", but then explains how values of N
+// greater than 32767 will be expressed as negative signed 16-bit numbers, so
+// that smells like \uN is limited to BMP).
SvStream& Out_Char(SvStream& rStream, sal_Unicode c,
int *pUCMode, rtl_TextEncoding eDestEnc, bool bWriteHelpFile)
{