|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-10-04 10:33 UTC] robert dot rcampbell at gmail dot com
Description: ------------ Request update to ICU 52.1 after October 9th, 2013, so that the Lao language can use the boundary analysis available to PHP - need it for word-wrapping in Lao. Thanks! PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 04:00:02 2025 UTC |
Looks like there may a bug in the PHP Intl code, after I downloaded and tested the latest PHP / PHP Intl (PECL). Got a Java version of it to work fine (based on icu4j). Someone else (cataphract) was able to get a C++ version working. Here's my 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()); ?> PHP Output: 52.1 int 0 int 597 int -1 int -1 int -1 int -1 int -1