[pmwiki-users] Search for terms with ss and ß

Dominique Faure dominique.faure at gmail.com
Wed Feb 8 04:50:10 PST 2023


And for the record, in php 8.2.2...

Deprecated: Function utf8_decode() is deprecated in
/home/debian/websites/***/pmwiki.php on line 354

On Wed, Feb 8, 2023 at 1:32 PM Dominique Faure
<dominique.faure at gmail.com> wrote:
>
> Hi,
>
> In order to minimize the references sources, what would be the best
> way to use that in ISO8859MakePageNamePatterns cookbook recipe instead
> of relying on another large set of regexp replacement?
>
> Something like below?
> -----
>   function cb_unaccent($m) { return UnaccentUTF8($m[1]); }
>
>   # standard patterns from pmwiki.php
>   SDV($PageNameChars, '-[:alnum:]');
>   SDV($MakePageNamePatterns, array(
>       "/'/" => '',                          # strip single-quotes
>       "/[^$PageNameChars]+/" => ' ',        # convert everything else to space
>       '/((^|[^-\\w])\\w)/' => 'cb_toupper', # CamelCase
>       '/ /' => '',                          # drop spaces
>       '/(.*)/' => 'cb_unaccent'));
> -----
>
> Regards,
> Dominique
>
> On Tue, Feb 7, 2023 at 3:54 PM Hans Bracker <design at softflow.uk> wrote:
> >
> > now released as new update
> > https://www.pmwiki.org/wiki/Cookbook/TextExtract
> >
> > I updated the documentation, with a note to recommend use of UnaccentUTF8
> > in conjunction with TextExtract
> >
> > In the script, to switch behaviour according if utf8 support is installed, I used
> > a call to function_exists('utf8string'), I did not see a variable for this.
> >
> >         //check if we got utf8, for setting /u modifier for search pattern
> >         if (function_exists('utf8string'))  $opt['utf8'] = 1;
> >
> > To be honest, I do not know if I should be using the /u modifier in any of the preg calls. It seems to work fine without it.
> >
> > ~Hans
> >
> >
> > _______________________________________________
> > pmwiki-users mailing list
> > pmwiki-users at pmichaud.com
> > http://www.pmichaud.com/mailman/listinfo/pmwiki-users



More information about the pmwiki-users mailing list