php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76001 locale_accept_from_http normalizes both zh_TW and zh_CN to zh
Submitted: 2018-02-23 20:12 UTC Modified: 2021-06-15 10:06 UTC
Votes:4
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:2 (50.0%)
From: mollasadra at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: intl (PECL)
PHP Version: 7.1.14 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mollasadra at gmail dot com
New email:
PHP Version: OS:

 

 [2018-02-23 20:12 UTC] mollasadra at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/locale.acceptfromhttp
---

php > echo locale_accept_from_http("zh_TW");
zh
php > echo locale_accept_from_http("zh_CN");
zh

Test script:
---------------
php > echo locale_accept_from_http("zh_TW");
zh
php > echo locale_accept_from_http("zh_CN");
zh


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-09-01 10:50 UTC] cmb@php.net
-Status: Open +Status: Verified -Package: *Languages/Translation +Package: intl
 [2019-09-01 10:50 UTC] cmb@php.net
Confirmed: <https://3v4l.org/e7HJ4>.
 [2021-06-15 10:06 UTC] cmb@php.net
-Status: Verified +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2021-06-15 10:06 UTC] cmb@php.net
Actually, this is not a bug.  The default ICU data neither
recognize zh_TW nor zh_CN, so report zh as fallback.  Using the
proper zh_Hant and zh_Hans gives the desired results.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 12:01:31 2024 UTC