<div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>I've spotted an issue when using posieve with check_rules or check-spell and wanted to output in xml.</div><div><a href="https://invent.kde.org/sdk/pology/-/blob/python3/sieve/check_rules.py#L211">https://invent.kde.org/sdk/pology/-/blob/python3/sieve/check_rules.py#L211</a> does not like the decode().<br></div><div>The same exists in <a href="https://invent.kde.org/sdk/pology/-/blob/python3/sieve/check_spell.py#L116">https://invent.kde.org/sdk/pology/-/blob/python3/sieve/check_spell.py#L116</a></div><div><br></div><div>I'm not sure if only removing the "
<code>.decode(locale.getpreferredencoding()</code>

" or how to replace it to keep this functionality.</div><div><br></div><div>Cheers,</div><div><br></div><div>Johnny<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 8 oct. 2022 à 18:04, Karl Ove Hufthammer <<a href="mailto:karl@huftis.org">karl@huftis.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Adrian Chaves skreiv 08.10.2022 17:11:<br>
><br>
> This is caused by <br>
> <a href="https://kingant.net/2019/01/rounding-numbers-in-python-2-and-python-3/" rel="noreferrer" target="_blank">https://kingant.net/2019/01/rounding-numbers-in-python-2-and-python-3/</a><br>
><br>
> When plural forms are found, the average is calculated and rounded. In <br>
> Python 2, round(2.5) is 3, in Python 3 round(2.5) is 2.<br>
><br>
> I have no strong opinion on the matter, but I am slightly inclined to <br>
> keep the Python 3 behavior on this.<br>
><br>
Yes, I see no reason not to use Python’s default rounding rules. But is <br>
there a reason that the average and not the sum is calculated <br>
(Chusslove)? After all, the sum *is* the number of words in the English <br>
source text (or translation).<br>
<br>
<br>
-- <br>
Karl Ove Hufthammer<br>
<br>
</blockquote></div>