remicollet / remirepo

Issue tracker for

Home Page:https://rpms.remirepo.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build php-intl against a different version of ICU not the 69 version

gjcarrette opened this issue · comments

The php 8.1 /usr/lib64/php/modules/intl.so looks for libicudata.so.69 which has an undesired definition in fr_CA for the dollar symbol
as described in https://unicode-org.atlassian.net/browse/CLDR-14862 a test from php is

https://github.com/gjcarrette/test-php-number-formatter/blob/main/test1.php

The github actions for the above repository show that ICU version 66 works for fr_CA.

Based on this StackOverflow thread it sounds like CLDR 40 contains the fix reverting that undesired definition, and ICU 70 is built using CLDR 40, so maybe upgrading ICU instead of downgrading would work?

Plan is to update to icu 71.1 in the next weeks

Update to ICU 71.1 in https://git.remirepo.net/cgit/rpms/lib/icu-last.git/commit/?id=f86e66ece4219f85469d573ace5f5f93edf7400a

Next builds will use it

  • 8.0.23RC1 and 8.1.10RC1 planned for Aug 18th

And if everything works as expected

  • GA versions planned for Sep 1st

On a test build, using your reproducer:

intl

Internationalization support => enabled
ICU version => 71.1
ICU Data version => 71.1
ICU Unicode version => 14.0

Directive => Local Value => Master Value
intl.default_locale => no value => no value
intl.error_level => 0 => 0
intl.use_exceptions => Off => Off

Locale::setDefault(fr_CA) = true
Locale::getDefault() = fr_CA
CURRENCY_SYMBOL = '$'
INT_CURRENCY_SYMBOL = 'CAD'
CURRENCY_CODE = 'CAD'
format(92345.67) = '92 345,67 $' [3932c2a03334352c3637c2a024]

Locale::setDefault(en_CA) = true
Locale::getDefault() = en_CA
CURRENCY_SYMBOL = '$'
INT_CURRENCY_SYMBOL = 'CAD'
CURRENCY_CODE = 'CAD'
format(92345.67) = '$92,345.67' [2439322c3334352e3637]

Locale::setDefault(fr_US) = true
Locale::getDefault() = fr_US
CURRENCY_SYMBOL = '$US'
INT_CURRENCY_SYMBOL = 'USD'
CURRENCY_CODE = 'USD'
format(92345.67) = '92 345,67 $US' [3932e280af3334352c3637c2a0245553]

Locale::setDefault(en_US) = true
Locale::getDefault() = en_US
CURRENCY_SYMBOL = '$'
INT_CURRENCY_SYMBOL = 'USD'
CURRENCY_CODE = 'USD'
format(92345.67) = '$92,345.67' [2439322c3334352e3637]

Or diff from previous output

--- 69	2022-08-16 09:38:41.284961236 +0200
+++ 71	2022-08-16 09:38:52.235955982 +0200
@@ -2,9 +2,9 @@
 intl
 
 Internationalization support => enabled
-ICU version => 69.1
-ICU Data version => 69.1
-ICU Unicode version => 13.0
+ICU version => 71.1
+ICU Data version => 71.1
+ICU Unicode version => 14.0
 
 Directive => Local Value => Master Value
 intl.default_locale => no value => no value
@@ -13,10 +13,10 @@
 
 Locale::setDefault(fr_CA) = true
 Locale::getDefault() = fr_CA
-CURRENCY_SYMBOL = '$ CA'
+CURRENCY_SYMBOL = '$'
 INT_CURRENCY_SYMBOL = 'CAD'
 CURRENCY_CODE = 'CAD'
-format(92345.67) = '92 345,67 $ CA' [3932c2a03334352c3637c2a024c2a04341]
+format(92345.67) = '92 345,67 $' [3932c2a03334352c3637c2a024]
 
 Locale::setDefault(en_CA) = true
 Locale::getDefault() = en_CA

8.1.10RC1 is already uploaded in the testing repository, using ICU 71.1, please test it
(8.0.23RC1 and 8.2.0beta3 are also available)

@remicollet are we releasing GA today?

Yes, 8.0.23 and 8.1.10 are now officially announced (and available in my repository).
Also https://blog.remirepo.net/post/2022/09/01/PHP-version-8.0.23-and-8.1.10

BTW, feedback was expected on the RC version :s