【发布时间】:2019-08-19 15:41:54
【问题描述】:
tidy_parse_string 函数将我的语言环境更改为“C”。
<?php
setlocale(LC_ALL, 'de_DE');
/* [...] */
echo setlocale(LC_ALL, 0); // Show "de_DE"
$tidy = tidy_parse_string($text, $config, 'UTF8');
echo setlocale(LC_ALL, 0); // show "C" instead of "de_DE"
?>
有防止它的选项吗?
我知道我可以在使用 tidy 函数后简单地重新更改我的语言环境
<?php
setlocale(LC_ALL, 'de_DE');
/* [...] */
$oldLocale = setlocale(LC_ALL, 0);
$tidy = tidy_parse_string($text, $config, 'UTF8');
setlocale(LC_ALL, $oldLocale);
?>
但我想知道这是功能、错误还是其他原因。
谢谢
【问题讨论】: