PATCH: spell checker recognises natl chars



PCRE is *really* fun...

Attached is a patch which, in connection with the PCRE library, enables the
spell checker to correctly check texts containing national characters (Note:
please apply the small patch sent about 1 hour ago before [Message-ID
<20010718171539.C7207@regulus>]).

The patch first sets the current locale in src/main.c (Brian, thanks for that
hint!). In src/spell-check.c, things are a little more complicated as PCRE's
posix compatibility functions (like regex.h's) don't know about locales :-((.
Therefore, I use the "real" pcre stuff if available. I hope this does not make
the code too unreadable?

I also made a little (and really easy) speed improvement, as the "new word"
regular expression is now static and compiled only once...

Opinions?

Albrecht.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Albrecht Dreß  -  Monschauer Straße 22  -  D-53121 Bonn (Germany)
      Phone (+49) 228 6199571  -  E-Mail albrecht.dress@arcormail.de
_________________________________________________________________________

balsa-spell-check-nat-chars.diff.gz



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]