Bug #55047 [Opn]: \ResourceBundle misses keys
| From: | franssen dot roland at gmail dot com | Date: | Mon, 13 Jun 2011 18:14:11 +0000 |
| Subject: | Bug #55047 [Opn]: \ResourceBundle misses keys | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-161373@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=55047&edit=1
ID: 55047
User updated by: franssen dot roland at gmail dot com
Reported by: franssen dot roland at gmail dot com
Summary: \ResourceBundle misses keys
Status: Open
Type: Bug
Package: I18N and L10N related
Operating System: Ubuntu 11.04
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
Until ICU4C library 4.2 all keys seem to be available
Previous Comments:
------------------------------------------------------------------------
[2011-06-13 19:32:53] franssen dot roland at gmail dot com
Description:
------------
I currently use the \ResourceBundle class from the intl extension. After an upgrade to 5.3.6 some
essental keys were missing.
Before i used a ICU4C data library for 3.8.1, after the upgrade i noticed ICU version upgraded too
(4.4.1). Using \ResourceBundle with the new data library results in unknown keys, downgrading the
data library resolves it.
Created the data library at;
http://apps.icu-project.org/datacustom/ICUData38.html
http://apps.icu-project.org/datacustom/ICUData44.html
See also;
http://site.icu-project.org/design/resbund/issues
Test script:
---------------
<?php
$res = new \ResourceBundle('en_US', '/usr/data/icu381', true);
var_dump($res->get('Languages'));
var_dump($res->getErrorMessage());
$res = new \ResourceBundle('en_US', '/usr/data/icu441', true);
var_dump($res->get('Languages'));
var_dump($res->getErrorMessage());
Expected result:
----------------
object(ResourceBundle)
"U_ZERO_ERROR"
object(ResourceBundle)
"U_ZERO_ERROR"
Actual result:
--------------
object(ResourceBundle)
"U_ZERO_ERROR"
NULL
"Cannot load resource element 'Languages': U_MISSING_RESOURCE_ERROR"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=55047&edit=1