php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78373 tidy_parse_string change the locale previously set with setlocale
Submitted: 2019-08-05 12:15 UTC Modified: 2019-08-05 14:53 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: chalda82 at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: Tidy (PECL)
PHP Version: 7.3.8 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: chalda82 at gmail dot com
New email:
PHP Version: OS:

 

 [2019-08-05 12:15 UTC] chalda82 at gmail dot com
Description:
------------
The function tidy_parse_string change locale to 'C'.

Test script:
---------------
<?php
setlocale(LC_ALL, 'de_DE');

/* [...] */

echo setlocale(LC_ALL, 0); // Show "de_DE"
$tidy = tidy_parse_string($text, $config, 'UTF8');
echo "\n".setlocale(LC_ALL, 0); // show "C" instead of "de_DE"
?>

Expected result:
----------------
de_DE
de_DE

Actual result:
--------------
de_DE
C

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-05 14:53 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2019-08-05 14:53 UTC] cmb@php.net
That's a known *upstream* issue[1].

[1] <https://github.com/htacg/tidy-html5/issues/770>.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed May 05 23:01:24 2021 UTC