Bug #68021 [Opn->Csd]: get_browser() browser_name_regex returns non-utf-8 characters

From: Date: Mon, 23 Mar 2015 05:14:32 +0000
Subject: Bug #68021 [Opn->Csd]: get_browser() browser_name_regex returns non-utf-8 characters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191538@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68021&edit=1

 ID:                 68021
 Updated by:         stas@php.net
 Reported by:        justin at commando dot io
 Summary:            get_browser() browser_name_regex returns non-utf-8
                     characters
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Unicode Engine related
 Operating System:   CentOS 6.5
 PHP Version:        5.4.32
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of datibbaw
Revision: http://git.php.net/?p=php-src.git;a=commit;h=5b5742c016a475cb20dcb9b8c19ba570a1110cf6
Log: Fixed #68021 - get_browser() browser_name_regex


Previous Comments:
------------------------------------------------------------------------
[2014-10-08 05:56:21] justin at commando dot io

> This breaks json_decode() trying to store it.

Brain fart there, that should have been json_encode() trying to store it.

------------------------------------------------------------------------
[2014-09-15 21:54:08] justin at commando dot io

Description:
------------
Calling get_browser() with a user-agent of:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/35.0.1916.153 Safari/537.36

Returns non-utf8 characters in the browser_name_regex field. See:

stdClass Object ( [browser_name_regex] => �^mozilla/5\.0 \(.*mac os x 10_9.*\)
applewebkit/.* \(khtml, like gecko\).*chrome/35\..*safari/.*$� 

This breaks json_decode() trying to store it.

Expected result:
----------------
Never return non-utf8 characters. This breaks json_decode();



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68021&edit=1


Thread (3 messages)

« previous php.bugs (#191538) next »