Loading core/lib/Drupal/Core/DrupalKernel.php +1 −1 Changes for core/lib/Drupal/Core/DrupalKernel.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -1001,7 +1001,7 @@ public static function bootEnvironment($app_root = NULL) { // Set sane locale settings, to ensure consistent string, dates, times and // numbers handling. setlocale(LC_ALL, 'C'); setlocale(LC_ALL, 'C.UTF-8', 'C'); // Set appropriate configuration for multi-byte strings. mb_internal_encoding('utf-8'); Loading core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php +15 −0 Changes for core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php: 15 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -12,6 +12,8 @@ use Prophecy\Argument; use Symfony\Component\HttpFoundation\Request; // cspell:ignore äöüßαβγδεζηθικλμνξοσὠ /** * Tests DIC compilation to disk. * Loading Loading @@ -295,4 +297,17 @@ public function testResetContainer() { $this->assertSame($request_stack, $container->get('request_stack')); } /** * Tests system locale. */ public function testLocale(): void { $utf8_string = 'äöüßαβγδεζηθικλμνξοσὠ'; // Test environment locale should be UTF-8. $this->assertSame($utf8_string, escapeshellcmd($utf8_string)); $request = Request::createFromGlobals(); $kernel = $this->getTestKernel($request); // Kernel environment locale should be UTF-8. $this->assertSame($utf8_string, escapeshellcmd($utf8_string)); } } core/tests/bootstrap.php +1 −1 Changes for core/tests/bootstrap.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ class_alias('\Drupal\Tests\DocumentElement', '\Behat\Mink\Element\DocumentElemen // Set sane locale settings, to ensure consistent string, dates, times and // numbers handling. // @see \Drupal\Core\DrupalKernel::bootEnvironment() setlocale(LC_ALL, 'C'); setlocale(LC_ALL, 'C.UTF-8', 'C'); // Set appropriate configuration for multi-byte strings. mb_internal_encoding('utf-8'); Loading Loading
core/lib/Drupal/Core/DrupalKernel.php +1 −1 Changes for core/lib/Drupal/Core/DrupalKernel.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -1001,7 +1001,7 @@ public static function bootEnvironment($app_root = NULL) { // Set sane locale settings, to ensure consistent string, dates, times and // numbers handling. setlocale(LC_ALL, 'C'); setlocale(LC_ALL, 'C.UTF-8', 'C'); // Set appropriate configuration for multi-byte strings. mb_internal_encoding('utf-8'); Loading
core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php +15 −0 Changes for core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php: 15 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -12,6 +12,8 @@ use Prophecy\Argument; use Symfony\Component\HttpFoundation\Request; // cspell:ignore äöüßαβγδεζηθικλμνξοσὠ /** * Tests DIC compilation to disk. * Loading Loading @@ -295,4 +297,17 @@ public function testResetContainer() { $this->assertSame($request_stack, $container->get('request_stack')); } /** * Tests system locale. */ public function testLocale(): void { $utf8_string = 'äöüßαβγδεζηθικλμνξοσὠ'; // Test environment locale should be UTF-8. $this->assertSame($utf8_string, escapeshellcmd($utf8_string)); $request = Request::createFromGlobals(); $kernel = $this->getTestKernel($request); // Kernel environment locale should be UTF-8. $this->assertSame($utf8_string, escapeshellcmd($utf8_string)); } }
core/tests/bootstrap.php +1 −1 Changes for core/tests/bootstrap.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ class_alias('\Drupal\Tests\DocumentElement', '\Behat\Mink\Element\DocumentElemen // Set sane locale settings, to ensure consistent string, dates, times and // numbers handling. // @see \Drupal\Core\DrupalKernel::bootEnvironment() setlocale(LC_ALL, 'C'); setlocale(LC_ALL, 'C.UTF-8', 'C'); // Set appropriate configuration for multi-byte strings. mb_internal_encoding('utf-8'); Loading