[php-src] Issue #13270: Inconsisten IntlDateFormatter between bullseye and bookworm builds

From: Date: Mon, 29 Jan 2024 14:11:42 +0000
Subject: [php-src] Issue #13270: Inconsisten IntlDateFormatter between bullseye and bookworm builds
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246360@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/13270 Author: rmikalkenas ### Description Inconsistent output can be seen with IntlDateFormatter between php:8.3.2-cli-bullseye and php:8.3.2-cli-bookworm docker builds. For whatever reason bookworm build adds a narrow non breakable space (nnbps) to formatted date. The following code: ```php <?php // composer require "symfony/var-dumper" require_once __DIR__ . '/vendor/autoload.php'; $formatter = new IntlDateFormatter( Locale::getDefault(), IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, 'UTC' ); dump( $formatter->format( new DateTimeImmutable( (new DateTimeImmutable('2024-01-29 15:24:37'))->format('Y-m-d H:i:s.u'), new DateTimeZone('UTC') ) ) ); ``` Resulted in this output: ``` // Output with: php:8.3.2-cli-bullseye // "Jan 29, 2024, 3:24 PM" // Output with: php:8.3.2-cli-bookworm // "Jan 29, 2024, 3:24\u{202F}PM" ``` ### PHP Version 8.3.2 ### Operating System Debian

« previous php.bugs (#246360) next »