https://bugs.kde.org/show_bug.cgi?id=511609

            Bug ID: 511609
           Summary: Narrow non-break space not considered as word
                    separator
    Classification: Frameworks and Libraries
           Product: frameworks-sonnet
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

I often write in French and, according to typography rules, I use narrow
no-break spaces (U+202F) between a word and a "double" punctuation mark that
immediately follows it (said marks: ?, !, ;, ;, «, »).

When I do that, the spell checker in all KDE apps (so the common denominator
should be sonnet?) wrongly considers the word, the NNBSP and the punctuation do
be the same word, which of course doesn't exist.

"Bonjour !" (with standard space character) -> spell checks as correct
"Bonjour !" (with NNBSP -> spell checks as incorrect; the whole string is
underlined with squiggles. Expected: the spell checker should say this text is
correct.

As a side note, the wider non-break space (U+00A0) does break words as it is
supposed to.
"Bonjour !" (with NBSP) -> spell checks as correct

I am trying to guess where the issue comes from. It seems sonnet uses
QTextBoundaryFinder as a backend. But it isn't clear that this library is meant
for spell checking, as opposed to deciding where to break the text at the end
of a line in a text area (non breakable spaces should prevent breaking lines,
but still separate words for spell checking intents). Maybe this is not the
right track though, since NBSP and NNBSP behave differently.

Another remark: using aspell directly in the command line breaks the words
correctly.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to