
Peter Udem - 2015-05-13 18:16:10
I did some changes to adapt the script to utf-8 encoding and german language:
1. insert
mb_internal_encoding("UTF-8");
class SpellCorrector {
2. substitute
preg_match_all("/[a-zäöüß]+/",mb_strtolower($text),$matches);
3. substitute
$alphabet = 'abcdefghijklmnopqrstuvwxyzäöüß';
4.
change some string-functions to mb_ substitution:
strlen -> mb_strlen
strtolower -> mb_strtolower
substr -> mb_substr
that works well