<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">In my version (1.5.7), in Scribus code,
paragraphs and newlines are encoded in XML,<br>
not with Unicode characters, and it is the same if I enter the
text manually or copy it from a simple text editor.<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><StoryText><br>
<DefaultStyle/><br>
<ITEXT CH="This is a paragraph up to this end-word."/><br>
<para/><br>
<ITEXT CH="This is a new paragraph, broken with a newline
here"/><br>
<breakline/><br>
<ITEXT CH="until the end-word."/><br>
<para/><br>
<ITEXT CH="END"/><br>
<trail/><br>
</StoryText><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Le 31.12.21 à 12:40, Bert Driehuis a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAN0x2A-bvejJom=NOXNhE8zXOGZpCU374cKSWoHUk-yvDMWKDg@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">I would expect the unicode value \u000A to match just newlines (or \u000C if
you need to match CR).
It has become a bit of a black magic these days...
With kind regards,
Bert
On Fri, 31 Dec 2021 at 02:49, Matt Miller <a class="moz-txt-link-rfc2396E" href="mailto:matt.miller@fastmail.com"><matt.miller@fastmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">I'm loading a text frame from a utf-8 encoded text file, and within my
Scribus Python code I want to search for the standard newline character,
ascii value 10. When I see an ascii 10 as the line separator I want to
apply a special paragraph style to the following paragraph. Most paragraphs
end with the Unicode paragraph separator character, \u2029, and in those
cases the default paragraph style is fine.
My problem is that both these types of characters are matching '\r' when I
use re.search in python. also, if I select either line separator character,
then do getText(), I get a '\r' no matter what. I've confirmed that my file
encoding is utf-8. What am I missing? How can I search for a simple '\n'
character?
--
Matt Miller
<a class="moz-txt-link-freetext" href="mailto:matt.miller@fastmail.com">mailto:matt.miller@fastmail.com</a>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
<a class="moz-txt-link-freetext" href="http://lists.scribus.net/pipermail/scribus/attachments/20211230/3c1178f6/attachment.htm">http://lists.scribus.net/pipermail/scribus/attachments/20211230/3c1178f6/attachment.htm</a>
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">___
Scribus Mailing List: <a class="moz-txt-link-abbreviated" href="mailto:scribus@lists.scribus.net">scribus@lists.scribus.net</a>
Edit your options or unsubscribe:
<a class="moz-txt-link-freetext" href="http://lists.scribus.net/mailman/listinfo/scribus">http://lists.scribus.net/mailman/listinfo/scribus</a>
See also:
<a class="moz-txt-link-freetext" href="http://wiki.scribus.net">http://wiki.scribus.net</a>
<a class="moz-txt-link-freetext" href="http://forums.scribus.net">http://forums.scribus.net</a>
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">-------------- next part --------------
An HTML attachment was scrubbed...
URL: <a class="moz-txt-link-rfc2396E" href="http://lists.scribus.net/pipermail/scribus/attachments/20211231/5519d97b/attachment.htm"><http://lists.scribus.net/pipermail/scribus/attachments/20211231/5519d97b/attachment.htm></a>
___
Scribus Mailing List: <a class="moz-txt-link-abbreviated" href="mailto:scribus@lists.scribus.net">scribus@lists.scribus.net</a>
Edit your options or unsubscribe:
<a class="moz-txt-link-freetext" href="http://lists.scribus.net/mailman/listinfo/scribus">http://lists.scribus.net/mailman/listinfo/scribus</a>
See also:
<a class="moz-txt-link-freetext" href="http://wiki.scribus.net">http://wiki.scribus.net</a>
<a class="moz-txt-link-freetext" href="http://forums.scribus.net">http://forums.scribus.net</a>
</pre>
</blockquote>
<p><br>
</p>
<div class="moz-signature">-- <br>
Silvain Dupertuis<br>
Route de Lausanne 335<br>
1293 Bellevue (Switzerland)<br>
tél. +41-(0)22-774.20.67<br>
portable +41-(0)79-604.87.52<br>
web: <a href="https://perso.silvain-dupertuis.org">silvain-dupertuis.org</a></div>
</body>
</html>