php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66002 Word Break Iterator not working on Lao using ICU 52.1
Submitted: 2013-10-30 13:35 UTC Modified: 2015-05-27 19:34 UTC
From: robert dot rcampbell at gmail dot com Assigned: cmb (profile)
Status: Closed Package: intl (PECL)
PHP Version: 5.5.5 OS: Ubuntu 13.10 amd64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: robert dot rcampbell at gmail dot com
New email:
PHP Version: OS:

 

 [2013-10-30 13:35 UTC] robert dot rcampbell at gmail dot com
Description:
------------
Looks like there may a bug in the PHP Intl code, after I downloaded and tested  PHP 5.5.5-1+debphp.org~raring+1, and PHP Intl PECL-3.0.0 with ICU 52.1.

Test script:
---------------
<?php
if (!extension_loaded('intl'))
   die('skip intl extension not enabled');
ini_set("intl.error_level", E_WARNING);
ini_set("intl.default_locale", "lo_LA");
echo INTL_ICU_VERSION;
$bi = IntlBreakIterator::createWordInstance('lo');
$myText =
"ພຣະທັມເຮັບເລີຄາດຄະເນລ່ວງໜ້າວ່າຄົນຈະຮູ້ແລະເຂົ້າໃຈເຖິງວຽກງານຂອງປະໂລຫິດໃນສະໄໝຂອງຊົນຊາດອິດສະລາເອນເພື່ອວ່າຜູ້ທີ່ຮັບຈົດໝາຍທີ່ຖືກບັນທຶກໄວ້ໃນພຣະທັມນີ້ຈະສາມາດເຂົ້າໃຈວ່າພຣະເຢຊູຊົງເຮັດສິ່ງໃດສຳລັບພວກເຂົາໃນສະຫວັນ";
$bi->setText($myText);
var_dump($bi->first());
var_dump($bi->next());
var_dump($bi->next());
var_dump($bi->next());
var_dump($bi->next());
var_dump($bi->next());
var_dump($bi->next());
?>

Expected result:
----------------
PHP Output:
52.1
int 0
[... a few int #'s starting from 0 to 597 ...]
int 597

Actual result:
--------------
PHP Output:
52.1
int 0
int 597
int -1
int -1
int -1
int -1
int -1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-30 14:46 UTC] robert dot rcampbell at gmail dot com
Also just tested on the debphp debian version of PHP Intl with same results (as well as it not working for Thai as well).

PHP: 5.5.5-1+debphp.org~raring+2
PHP Intl: 1.1.0 from debphp.org
 [2015-05-27 17:42 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2015-05-27 17:42 UTC] cmb@php.net
That might be an issue with the ICU library version. It seems to
work fine with ICU 54.1, see <http://3v4l.org/MLe0U>. Please try
with a recent version, Robert - would that work for you?
 [2015-05-27 19:19 UTC] robert dot rcampbell at gmail dot com
Just tested on a Windows 8.1 WAMP install with manually upgraded PHP, and it works  great! WAMP's current setup includes ICU 51 - the new PHP has ICU 54. So,it's fixed on my end. Thanks!
 [2015-05-27 19:34 UTC] cmb@php.net
-Status: Feedback +Status: Closed
 [2015-05-27 19:34 UTC] cmb@php.net
Fine, so I'm closing the ticket. And sorry for the late reply.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Dec 03 01:01:23 2020 UTC