php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69120 "Any-Latin" gives invalid ID error
Submitted: 2015-02-25 15:02 UTC Modified: 2015-02-28 12:23 UTC
From: mg at artigo dot pl Assigned:
Status: Closed Package: intl (PECL)
PHP Version: 5.6.6 OS: Windows
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: mg at artigo dot pl
New email:
PHP Version: OS:

 

 [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');


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-25 15:04 UTC] mg at artigo dot pl
-Package: intercept +Package: intl
 [2015-02-25 15:04 UTC] mg at artigo dot pl
Package: INTL
 [2015-02-27 07:22 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2015-02-27 07:22 UTC] ab@php.net
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.
 [2015-02-27 07:24 UTC] ab@php.net
Ahhh, you're talking about PECL. My try was with the core, so that's what it is probably.

Thanks.
 [2015-02-27 11:53 UTC] mg at artigo dot pl
-Status: Feedback +Status: Open
 [2015-02-27 11:53 UTC] mg at artigo dot pl
Hi!

Thank you for quick check and reply.
It is possible that issue is caused by something outside of PHP, but I am out of ideas.

When I switch to PHP 5.5 (both downloaded from windows.php.net) it starts to work.
The difference is ICU version:
ICU version 	51.2 

and in PHP 5.6.6 it is:
ICU version 	54.1 

For me it seems like something may be missing in Windows built (maybe part of ICU db).

I will be happy to make further tests to debug the issue.
 [2015-02-27 12:28 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2015-02-27 12:28 UTC] ab@php.net
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.
 [2015-02-28 12:23 UTC] mg at artigo dot pl
-Status: Feedback +Status: Closed
 [2015-02-28 12:23 UTC] mg at artigo dot pl
Hi!

I checked my PATH today and found another icu54 in directory of latest Poedit.
Removed it from path and it works!

Thanks!
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Oct 26 16:01:23 2020 UTC