Bug #77940 [Ver->Csd]: test using outdated mon_thousands_sep for Swedish
| From: | cmb@php.net | Date: | Thu, 25 Apr 2019 07:00:40 +0000 |
| Subject: | Bug #77940 [Ver->Csd]: test using outdated mon_thousands_sep for Swedish | ||
| References: | 1 | Groups: | php.bugs php.qa |
| Request: | Send a blank email to php-bugs+get-220603@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77940&edit=1
ID: 77940
Updated by: cmb@php.net
Reported by: v-altruo at microsoft dot com
Summary: test using outdated mon_thousands_sep for Swedish
-Status: Verified
+Status: Closed
Type: Bug
Package: Testing related
Operating System: Windows
PHP Version: 7.2.18RC1
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=37ca6a7a2a333b5a783b2b8726bb5c9674c6e301
Log: Fix #77940: test using outdated mon_thousands_sep for Swedish
Previous Comments:
------------------------------------------------------------------------
[2019-04-24 23:16:06] requinix@php.net
I'm not entirely sure but I think this changed with CLDR 23 around 2013.
https://unicode.org/cldr/charts/22/by_type/patterns.numbers.html#Western_Digits_(latn)
https://unicode.org/cldr/charts/23/by_type/patterns.numbers.html#Western_Digits_(latn)
22 had a <currencyGroup> with lone Swedish as '.' while 23 dropped the category.
Regardless, current chart says the separator should indeed be a space.
https://unicode.org/cldr/charts/latest/verify/numbers/sv.html
------------------------------------------------------------------------
[2019-04-24 22:27:21] v-altruo at microsoft dot com
Description:
------------
Test fails across all builds.
Test location: ext\standard\tests\strings\bug65769.phpt
I believe the separator for thousands in Swedish are " " which is why the test is failing.
Test script:
---------------
$locale = setlocale(LC_ALL, 'sve');
$lconv = localeconv();
var_dump(
$locale,
$lconv['decimal_point'],
$lconv['thousands_sep'],
$lconv['int_curr_symbol'],
$lconv['currency_symbol'],
$lconv['mon_decimal_point'],
$lconv['mon_thousands_sep']
);
Expected result:
----------------
string(19) "Swedish_Sweden.1252"
string(1) ","
string(1) "Â "
string(3) "SEK"
string(2) "kr"
string(1) ","
string(1) "."
Actual result:
--------------
string(19) "Swedish_Sweden.1252"
string(1) ","
string(1) "Â "
string(3) "SEK"
string(2) "kr"
string(1) ","
string(1) " "
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77940&edit=1