Skip to content

Commit

Permalink
Update mbstring
Browse files Browse the repository at this point in the history
  • Loading branch information
mowangjuanzi committed Jan 20, 2024
1 parent 3ca5141 commit af5ffb1
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 70 deletions.
94 changes: 31 additions & 63 deletions appendices/migration74/other-changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@
<sect2 xml:id="migration74.other-changes.filter">
<title>数据过滤</title>
<para>
<link linkend="book.filter">filter</link> 扩展不再展示 <option role="configure">--with-pcre-dir</option>
用于 Unix 构建,并且现在可以在使用 <command>./configure</command> 时可靠地编译为共享。
<link linkend="book.filter">filter</link> 扩展不再展示用于 Unix 构建的 <option role="configure">--with-pcre-dir</option>,并且现在可以在使用
<command>./configure</command> 时可靠地编译为共享。
</para>
</sect2>

Expand All @@ -364,41 +364,35 @@
</listitem>
<listitem>
<simpara>
Threshold-cropping now uses the algorithm of system libgd
阈值裁剪(threshold-cropping)现在使用系统 libgd 算法
</simpara>
</listitem>
</itemizedlist>
<para>
The default <literal>$mode</literal> parameter of
<function>imagecropauto</function> has been changed to
<constant>IMG_CROP_DEFAULT</constant>; passing <literal>-1</literal>
is now deprecated.
<function>imagecropauto</function> 的默认 <literal>$mode</literal> 参数已更改为
<constant>IMG_CROP_DEFAULT</constant>;现已弃用传递 <literal>-1</literal>。
</para>
<para>
<function>imagescale</function> now supports aspect ratio preserving
scaling to a fixed height by passing <literal>-1</literal>
as <literal>$new_width</literal>.
<function>imagescale</function> 现在支持将 <literal>-1</literal> 传递给
<literal>$new_width</literal>,从而保留宽高比以缩放到固定的高度。
</para>
</sect2>

<sect2 xml:id="migration74.other-changes.hash">
<title>HASH Message Digest Framework</title>
<title>HASH 消息摘要框架</title>
<para>
The <link linkend="book.hash">hash</link> extension cannot be disabled
anymore and is always an integral part of any PHP build, similar to
the <link linkend="book.datetime">date</link> extension.
不能再禁用 <link linkend="book.hash">hash</link> 扩展,并且始终是编译 PHP 的组成部分,类似于 <link linkend="book.datetime">date</link> 扩展。
</para>
</sect2>

<sect2 xml:id="migration74.other-changes.intl">
<title>Intl</title>
<para>
The <link linkend="book.intl">intl</link> extension
now requires at least ICU 50.1.
<link linkend="book.intl">intl</link> 扩展现在至少需要 ICU 50.1。
</para>
<para>
<classname>ResourceBundle</classname> now implements
<interfacename>Countable</interfacename>.
<classname>ResourceBundle</classname> 现在实现了
<interfacename>Countable</interfacename>
</para>
</sect2>

Expand All @@ -412,27 +406,23 @@
<sect2 xml:id="migration74.other-changes.libxml">
<title>Libxml</title>
<para>
All libxml-based extensions now require libxml 2.7.6 or newer.
所有基于 libxml 的扩展现在都需要 libxml 2.7.6 及其更高的版本。
</para>
</sect2>

<sect2 xml:id="migration74.other-changes.mbstring">
<title>Multibyte String</title>
<title>多字节字符串</title>
<para>
The oniguruma library is no longer bundled with PHP, instead libonig needs
to be available on the system. Alternatively
<option role="configure">--disable-mbregex</option> can be used to disable
the mbregex component.
oniguruma 库不再与 PHP 捆绑,而是需要在系统上提供 libonig。或者可以使用 <option role="configure">--disable-mbregex</option> 禁用 mbregex 组件。
</para>
</sect2>

<sect2 xml:id="migration74.other-changes.opcache">
<title>OPcache</title>
<para>
The <option role="configure">--disable-opcache-file</option> and
<option role="configure">--enable-opcache-file</option> configure options
have been removed in favor of the
<link linkend="ini.opcache.file-cache">opcache.file_cache</link> INI directive.
<option role="configure">--disable-opcache-file</option> 和
<option role="configure">--enable-opcache-file</option> 配置选项已移除,以支持
<link linkend="ini.opcache.file-cache">opcache.file_cache</link> INI 指令。
</para>
</sect2>

Expand All @@ -447,69 +437,47 @@
<sect2 xml:id="migration74.other-changes.pear">
<title>PEAR</title>
<para>
Installation of PEAR (including PECL) is no longer enabled by default. It
can be explicitly enabled using <option role="configure">--with-pear</option>.
This option is deprecated and may be removed in the future.
默认不再启用 PEAR(包括 PECL)的安装。可以使用 <option role="configure">--with-pear</option> 手动启用它。此选项已弃用,将来可能会移除。
</para>
</sect2>

<sect2 xml:id="migration74.other-changes.reflection">
<title>Reflection</title>
<para>
The numeric values of the modifier constants
(<literal>IS_ABSTRACT</literal>,
<literal>IS_DEPRECATED</literal>,
<literal>IS_EXPLICIT_ABSTRACT</literal>,
<literal>IS_FINAL</literal>,
<literal>IS_IMPLICIT_ABSTRACT</literal>,
<literal>IS_PRIVATE</literal>,
<literal>IS_PROTECTED</literal>,
<literal>IS_PUBLIC</literal>, and
<literal>IS_STATIC</literal>) on the
<classname>ReflectionClass</classname>,
<classname>ReflectionFunction</classname>,
<classname>ReflectionMethod</classname>,
<classname>ReflectionObject</classname>, and
<classname>ReflectionProperty</classname>
classes have changed.
<classname>ReflectionClass</classname>、<classname>ReflectionFunction</classname>、<classname>ReflectionMethod</classname>、<classname>ReflectionObject</classname>
和 <classname>ReflectionProperty</classname> 类的修饰符常量
(<literal>IS_ABSTRACT</literal>、<literal>IS_DEPRECATED</literal>、<literal>IS_EXPLICIT_ABSTRACT</literal>、<literal>IS_FINAL</literal>、<literal>IS_IMPLICIT_ABSTRACT</literal>、<literal>IS_PRIVATE</literal>、<literal>IS_PROTECTED</literal>、<literal>IS_PUBLIC</literal>
和 <literal>IS_STATIC</literal>) 的数值已经更改。
</para>
</sect2>

<sect2 xml:id="migration74.other-changes.simplexml">
<title>SimpleXML</title>
<para>
<classname>SimpleXMLElement</classname> now implements
<interfacename>Countable</interfacename>.
<classname>SimpleXMLElement</classname> 现在实现了
<interfacename>Countable</interfacename>
</para>
</sect2>

<sect2 xml:id="migration74.other-changes.sqlite3">
<title>SQLite3</title>
<para>
The bundled libsqlite has been removed. To build the
<link linkend="book.sqlite3">SQLite3</link> extension a
system libsqlite3 ≥ 3.7.4 is now required. To build the
<link linkend="ref.pdo-sqlite">PDO_SQLite</link> extension
a system libsqlite3 ≥ 3.5.0 is now required.
捆绑的 libsqlite 已移除。要编译 <link linkend="book.sqlite3">SQLite3</link> 扩展,现在需要系统
libsqlite3 ≥ 3.7.4。要编译 <link linkend="ref.pdo-sqlite">PDO_SQLite</link> 扩展,现在需要系统 libsqlite3 ≥ 3.5.0。
</para>
<para>
Serialization and unserialization of <classname>SQLite3</classname>,
<classname>SQLite3Stmt</classname> and <classname>SQLite3Result</classname>
is now explicitly forbidden. Formerly, serialization of instances of
these classes was possible, but unserialization yielded unusable objects.
现在明确禁止 <classname>SQLite3</classname>、<classname>SQLite3Stmt</classname> 和 <classname>SQLite3Result</classname>
的序列化和反序列化。以前,可以序列化这些类的实例,但反序列化会产生不能用的对象。
</para>
<para>
The <literal>@param</literal> notation can now also be used to
denote SQL query parameters.
<literal>@param</literal> 表示法现在也可用于表示 SQL 查询参数。
</para>
</sect2>

<sect2 xml:id="migration74.other-changes.zip">
<title>Zip</title>
<para>
The bundled libzip library has been removed.
A system libzip >= 0.11 is now necessary to build the
<link linkend="book.zip">zip</link> extension.
捆绑的 libzip 库已移除。编译 zip 扩展现在需要系统 libzip >= 0.11。
</para>
</sect2>

Expand Down
6 changes: 3 additions & 3 deletions appendices/migration80/incompatible.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 7f4d351cb527938a04343c06a8fd4353b456c5d3 Maintainer: avenger Status: partial -->
<!-- EN-Revision: 7f4d351cb527938a04343c06a8fd4353b456c5d3 Maintainer: avenger Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<sect1 xml:id="migration80.incompatible" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>不向后兼容的变更</title>
Expand Down Expand Up @@ -1347,8 +1347,8 @@ $array["key"];
</listitem>
<listitem>
<para>
Specifying out of range rounds for SHA256/SHA512 <function>crypt</function> will now fail with
<literal>*0</literal> instead of clamping to the closest limit. This matches glibc behavior.
<function>crypt</function> 现在指定超出 SHA256/SHA512 范围的 rounds 时将失败,返回
<literal>*0</literal>,而不是修改为最接近的限制。这与 glibc 的行为相匹配。
</para>
</listitem>
<listitem>
Expand Down
13 changes: 10 additions & 3 deletions reference/mbstring/functions/mb-convert-encoding.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 77a60306bc47d2151ebca7e6983897a0371a9671 Maintainer: daijie Status: ready -->
<!-- EN-Revision: 2c17cef6e71c3d85011319cde128cc4edf89a053 Maintainer: daijie Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.mb-convert-encoding" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>mb_convert_encoding</refname>
<refpurpose>转换字符串,从一个字符编码到另一个字符编码</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
Expand Down Expand Up @@ -61,7 +61,7 @@
</variablelist>
</para>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Expand Down Expand Up @@ -90,6 +90,13 @@
</row>
</thead>
<tbody>
<row>
<entry>8.2.0</entry>
<entry>
<function>mb_convert_encoding</function>
将不再返回以下非文本编码:<literal>"Base64"</literal>、<literal>"QPrint"</literal>、<literal>"UUencode"</literal>、<literal>"HTML entities"</literal>、<literal>"7 bit"</literal> 和 <literal>"8 bit"</literal>。
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
Expand Down
25 changes: 24 additions & 1 deletion reference/mbstring/functions/mb-detect-encoding.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 16a1bdfd1c36108534b5af08dc4b751c7ac0fdaf Maintainer: daijie Status: ready -->
<!-- EN-Revision: 2c17cef6e71c3d85011319cde128cc4edf89a053 Maintainer: daijie Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<refentry xml:id="function.mb-detect-encoding" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -76,6 +76,29 @@
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.2.0</entry>
<entry>
<function>mb_detect_encoding</function>
将不再返回以下非文本编码:<literal>"Base64"</literal>、<literal>"QPrint"</literal>、<literal>"UUencode"</literal>、<literal>"HTML entities"</literal>、<literal>"7 bit"</literal> 和 <literal>"8 bit"</literal>。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
Expand Down

0 comments on commit af5ffb1

Please sign in to comment.