Skip to content

Add PHP 8.2 changelog entry to mb_convert_encoding() and mb_detect_encoding() #3108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions reference/mbstring/functions/mb-convert-encoding.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<refname>mb_convert_encoding</refname>
<refpurpose>Convert a string from one character encoding to another</refpurpose>
</refnamediv>

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

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Expand All @@ -78,7 +78,7 @@
&reftitle.errors;
<para>
As of PHP 8.0.0, a <classname>ValueError</classname> is thrown if the
value of <parameter>to_encoding</parameter> or
value of <parameter>to_encoding</parameter> or
<parameter>from_encoding</parameter> is an invalid encoding.
Prior to PHP 8.0.0, a <constant>E_WARNING</constant> was emitted instead.
</para>
Expand All @@ -95,19 +95,29 @@
</row>
</thead>
<tbody>
<row>
<entry>8.2.0</entry>
<entry>
<function>mb_convert_encoding</function> will no longer return
the following non text encodings:
<literal>"Base64"</literal>, <literal>"QPrint"</literal>,
<literal>"UUencode"</literal>,<literal>"HTML entities"</literal>,
<literal>"7 bit"</literal> and <literal>"8 bit"</literal>.
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
<function>mb_convert_encoding</function> will now throw a
<classname>ValueError</classname> when
<classname>ValueError</classname> when
<parameter>to_encoding</parameter> is passed an invalid encoding.
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
<function>mb_convert_encoding</function> will now throw a
<classname>ValueError</classname> when
<classname>ValueError</classname> when
<parameter>from_encoding</parameter> is passed an invalid encoding.
</entry>
</row>
Expand Down Expand Up @@ -154,7 +164,7 @@ $str = mb_convert_encoding($str, "EUC-JP", "auto");
</example>
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand All @@ -165,7 +175,7 @@ $str = mb_convert_encoding($str, "EUC-JP", "auto");
</simplelist>
</para>
</refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
Expand Down
26 changes: 26 additions & 0 deletions reference/mbstring/functions/mb-detect-encoding.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,32 @@
</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> will no longer return
the following non text encodings:
<literal>"Base64"</literal>, <literal>"QPrint"</literal>,
<literal>"UUencode"</literal>,<literal>"HTML entities"</literal>,
<literal>"7 bit"</literal> and <literal>"8 bit"</literal>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

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