<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[User defined language - operator § not working]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1784750292598-flyn-operator.png" alt="flyn operator §.png" class=" img-fluid img-markdown" /><br />
Hi,<br />
I am using the user defined language since a long time, on a personal language i’m developing named flyn.<br />
Recently, i added a new operator to the language : §<br />
But syntax high-lighting is not working on it (see screenshot).<br />
I suspect it is because it’s a multi-byte UTF8 character.<br />
Can anyone confirm ?<br />
(and correct if possible)</p>
<p dir="auto">Cheers<br />
Have a nice summer everyone.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/27613/user-defined-language-operator-not-working</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 22:36:28 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/27613.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Jul 2026 19:58:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to User defined language - operator § not working on Wed, 22 Jul 2026 21:17:19 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/arnaud-derette" aria-label="Profile: arnaud-derette">@<bdi>arnaud-derette</bdi></a> <a href="/post/105959">said</a>:<br />
I does not work in the operator 2 list either (or may be i need to do something more than just put § there ?)</p>
</blockquote>
<p dir="auto">Like I said, because you want the § to <em>not</em> have spaces, like in <code>parent§.D</code>, it <em>won’t</em> work for you.  § in operators 2 will only work if you can have spaces around the §</p>
]]></description><link>https://community.notepad-plus-plus.org/post/105960</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/105960</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 22 Jul 2026 21:17:19 GMT</pubDate></item><item><title><![CDATA[Reply to User defined language - operator § not working on Wed, 22 Jul 2026 21:11:53 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a></p>
<p dir="auto">Thanks for the quick answer.<br />
I does not work in the operator 2 list either (or may be i need to do something more than just put § there ?)</p>
<p dir="auto">It’s not that important, so i will keep the plugin solution for another time.</p>
<p dir="auto">Thank you again.<br />
Cheers</p>
]]></description><link>https://community.notepad-plus-plus.org/post/105959</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/105959</guid><dc:creator><![CDATA[arnaud derette]]></dc:creator><pubDate>Wed, 22 Jul 2026 21:11:53 GMT</pubDate></item><item><title><![CDATA[Reply to User defined language - operator § not working on Wed, 22 Jul 2026 20:40:03 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/arnaud-derette" aria-label="Profile: arnaud-derette">@<bdi>arnaud-derette</bdi></a> <a href="/post/105957">said</a>:</p>
<p dir="auto">I suspect it is because it’s a multi-byte UTF8 character.<br />
Can anyone confirm ?</p>
</blockquote>
<p dir="auto">Correct.</p>
<p dir="auto">Due to implementation details, UTF8 <em>might</em> work in the “separators required” operator 2 list, but it does not in the operators 1 list.  (It’s because of the “forwards” vs “backwards” differences, as described <a href="https://npp-user-manual.org/docs/udl/introduction/#more-on-forward-and-backward-detection-logic" rel="nofollow ugc">here</a> – under the hood, that means the non-separators-required doesn’t see it correctly).</p>
<blockquote>
<p dir="auto">(and correct if possible)</p>
</blockquote>
<p dir="auto">Not any time soon: UDL was <em>not</em> designed with multi-byte encodings in mind.  (I tried looking into the poor UTF8 support in UDL a year or two ago, and got so lost, I haven’t tried to dive back in.  And the developer has made it clear after a decade of ignored feature requests that UDL is ‘good enough’ in his opinion.)</p>
<p dir="auto">If you didn’t need to cozy the § next to the text, then a workaround would be to move <code>§</code> to the operator 2 list.</p>
<p dir="auto"><img src="/assets/uploads/files/1784752121953-27745250-0449-4062-ba6e-2ad8bb766931-image.jpeg" alt="27745250-0449-4062-ba6e-2ad8bb766931-image.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto">But because you want it to work on <code>parent§</code>, that won’t work for you.</p>
<p dir="auto">Instead, I would suggest using EnhanceAnyLexer plugin, and setting the foreground color for the regex that matches the <code>§</code> character.  Here’s an example where I set the 0xBBGGRR (*) to 0xFF00FF, and match on the <code>§</code>.  And this is showing it works</p>
<p dir="auto"><img src="/assets/uploads/files/1784752533805-07936c4f-bccc-4898-b3f2-6c52cb8f8b65-image.jpeg" alt="07936c4f-bccc-4898-b3f2-6c52cb8f8b65-image.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto">For a UDL named “flyn”, The EnhanceAnyLexer.ini would need to contain:</p>
<pre><code>[flyn]
0xFF00FF = §
</code></pre>
<p dir="auto">(using <strong>Plugins &gt; EnhanceAnyLexer &gt; Enhance This Lexer</strong> will open the config in the right place, and will create the section for your active language or UDL if that section isn’t already in the INI, and will move to that section if it is already in the INI)</p>
<p dir="auto">This sets the regex matching <code>§</code> to be magenta (blue and red at full intensity).</p>
<p dir="auto">(*: yes, the order is reversed from most RGB words, so BLUE is the upper two nybbles; thank you MS)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/105958</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/105958</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 22 Jul 2026 20:40:03 GMT</pubDate></item></channel></rss>