Hi,
I’ve authored a fix for browscap: https://github.com/php/php-src/pull/827
Bug report: https://bugs.php.net/bug.php?id=68021
It replaces the current expression delimiters of \xA7 with a tilde (~) that’s ASCII compatible and therefore plays nice with UTF-8.
Seems like a no-brainer to apply this to 5.4 onwards, but perhaps somebody has a compelling reason why those section symbols are an absolute necessity.
Hi,
I’ve authored a fix for browscap:
https://github.com/php/php-src/pull/827Bug report: https://bugs.php.net/bug.php?id=68021
It replaces the current expression delimiters of \xA7 with a tilde (~)
that’s ASCII compatible and therefore plays nice with UTF-8.Seems like a no-brainer to apply this to 5.4 onwards, but perhaps
somebody has a compelling reason why those section symbols are an
absolute necessity.
Do you know that there is no and will never be a useragent string (and
thus a regexp) containing the ~ in any valid browscap file? The current
\xA7 is a quite safe guess, I'd say.
If this is changed is done I'd suggest escaping the regexp accordingly
to be on the safe side.
johannes
P.S. see i.e.
"[e-SocietyRobot(http://www.yama.info.waseda.ac.jp/~yamana/es/)]" which
seems to exist in the current browscap version.
If this is changed is done I'd suggest escaping the regexp accordingly
to be on the safe side.
ah, I see this is already done. Still see no big need to limit this to
ASCII (yes, I read the user's report)
johannes