[dokuwiki] Re: Windows shares with non-Roman Server names

  • From: Myron Turner <turnermm02@xxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 01 Jul 2010 05:26:01 -0500

Doogie wrote:
On Wed, 30 Jun 2010 09:08:23 -0500, Myron Turner <turnermm02@xxxxxxx>
wrote:

The regular expression in parser.php is:

     $this->pattern = "\\\\\\\\\w+?(?:\\\\[\w$]+)+";

My first thought was that \w+? did not match non-Roman characters, but
this pattern has no trouble if non-Roman characters appear in the path
or file names, which are matched by \\\\[\w$]+.



Myron

Hi Myron!

It think you ran into a localisation issue. It might be true, that \w
matches non-roman characters on _your_ machine, with _your_ localisation
settins of your OS. But this does not necessarily mean, that \w matches
non-roman characters on other machines, namely the server where your
dokuwiki is installed.

From the PHP docs:
(http://de2.php.net/manual/en/regexp.reference.backslash.php)
"A "word" character is any letter or digit or the underscore character,
that is, any character which can be part of a Perl "word". The definition
of letters and digits is controlled by PCRE's character tables, and may
vary if locale-specific matching is taking place. For example, in the "fr"
(French) locale, some character codes greater than 128 are used for
accented letters, and these are matched by \w. "

c'Ya
  Doogie



Yes, I saw that, but as I pointed out, in one case \w works and in one it doesn't.


Myron


--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: