Hi.
I am using Infopath 2003 (SP3) and have a formatting problem with line breaks in a Rich-Text element.
Writing text to the element and inserting line breaks by the usage of return works fine so far. When I select some text inclusive the line break in order to apply some formatting, say, changing to Arial 7pt. Then all the selected text except of the line break gets the formatting. You can see the missing formatting instruction when the generated XML file is opened by a text editor. The generated extract looks like
<div xmlns="http://www.w3.org/1999/xhtml" style="MARGIN-TOP: 0.5pt; PADDING-RIGHT: 0cm; MARGIN-BOTTOM: 1.25pt; FONT-SIZE: 12pt"><span style="FONT-SIZE: 7pt"><font face="Arial">This is the first line </font></span></div>
<div xmlns="http://www.w3.org/1999/xhtml" style="MARGIN-TOP: 0cm; PADDING-RIGHT: 0cm; MARGIN-BOTTOM: 6pt; FONT-SIZE: 12pt"><span style="FONT-SIZE: 7pt"><strong><font face="Arial"></font></strong></span> </div>
<div xmlns="http://www.w3.org/1999/xhtml" style="MARGIN-TOP: 0cm; PADDING-RIGHT: 0cm; MARGIN-BOTTOM: 0pt; FONT-SIZE: 12pt"><span style="FONT-SIZE: 7pt"><strong><font face="Arial">Just another line.</font></strong></span></div>
As can be seen the line break represented as whitespace " " is within the second div tag, but not with the font-tag. This becomes a problem when the content is used in other applications. E.g. in Word it results in a wrong formatting of the empty line (Arial 12pt instead of Arial 7pt). Beside that the line break is given as UTF-8=C2A0 or ASCII-decimal=160 that is the non breaking space. This results in Word into an "invisible" circle character.
If one use a text element the line break will be represented as CR LF, i.e. ASCII decimal 0D 0A.
It would be great if anybody of you could give me a hint on how to deal with line breaks properly.
Thank you very much.