|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-02-25 15:02 UTC] mg at artigo dot pl
Description:
------------
Following code no longer works:
$transliterator = Transliterator::create('Any-Latin; Title');
var_dump($transliterator);
transliterator is NULL
or with function
transliterator_transliterate('Any-Latin; Title', 'test');
Displays following error.
Warning: transliterator_transliterate(): Could not create transliterator with ID "Any-Latin; Title" (transliterator_create: unable to open ICU transliterator with id "Any-Latin; Title": U_INVALID_ID)
According to http://demo.icu-project.org/icu-bin/translit
Any-Latin is still a valid value.
Test script:
---------------
transliterator_transliterate('Any-Latin; Title', 'test');
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 15:00:01 2025 UTC |
Please see below: Debug\php.exe -n -d extension_dir=Debug -d extension=php_intl.dll -r "var_dump(transliterator_transliterate('Any-Latin; Title', 'test')); $transliterator = Transliterator::create('Any-Latin; Title'); var_dump($transliterator); " string(4) "Test" object(Transliterator)#1 (1) { ["id"]=> string(15) "Any-Latin;Title" } Thus I see the output you expect, using ICU 54.1 . Not sure what else could be affecting it, please research. Thanks.Ok, so I just fetched some 5.6 release, but actually it's the same as my 5.6-dev D:\snaps\php-5.6.6-nts-Win32-VC11-x64>php.exe -n -d extension_dir=ext -d extension=php_intl.dll -r "var_dump(transliterator_transliterate('Any-Latin; Title', 'test')); $transliterator = Transliterator::create('Any-Latin; Title'); var_dump($transliterator); " string(4) "Test" object(Transliterator)#1 (1) { ["id"]=> string(15) "Any-Latin;Title" } Could you please check the same going directly into the PHP root dir? With the ICU db - probably doubtful. We were updating the ICU db once since the .0 release, but only because of the timezone data. As I see, the PECL ext doesn't provide 5.6 bins, so this is reported against the core. Please ensure there are no other ICU 54.1 builds in the preceding paths, not that it pulls some wrong DLLs. That's also the frequent error source when running under Apache/IIS. To double check, you could also use another machine without PHP, or alike. Thanks.