riched20: Use \ulnone instead of \ul0 for no underline.

Vincent Povirk madewokherd at
Mon Aug 19 17:38:13 CDT 2013

An application I'm working on seems to do its own processing of the
rtf which doesn't know how to handle \ul0.

Testing on Windows (by saving rtf documents with wordpad and viewing
them with notepad) shows that it uses \ulnone instead of \ul0 to end
underline. Wine and Windows are both able to read either one.

I don't think I can easily make an automated test because the output
is otherwise very different between Wine and Windows.
-------------- next part --------------
From 0b05196b3e53c0dcbc08648a527e470e73f0a586 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at>
Date: Mon, 19 Aug 2013 17:31:38 -0500
Subject: [PATCH] riched20: Use \ulnone instead of \ul0 for no underline.

 dlls/riched20/writer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/riched20/writer.c b/dlls/riched20/writer.c
index 6a4538c..ea797fd 100644
--- a/dlls/riched20/writer.c
+++ b/dlls/riched20/writer.c
@@ -680,7 +680,7 @@ ME_StreamOutRTFCharProps(ME_OutStream *pStream, CHARFORMAT2W *fmt)
         case CFU_UNDERLINENONE:
-          strcat(props, "\\ul0");
+          strcat(props, "\\ulnone");
     else if (fmt->dwEffects & CFE_UNDERLINE)

More information about the wine-patches mailing list