]> granicus.if.org Git - php/commitdiff
Update iconv parameter names
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 29 Sep 2020 14:29:15 +0000 (16:29 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 29 Sep 2020 16:11:07 +0000 (18:11 +0200)
And rename charset to encoding, including inside error messages.

Closes GH-6234.

15 files changed:
ext/iconv/iconv.c
ext/iconv/iconv.stub.php
ext/iconv/iconv_arginfo.h
ext/iconv/tests/iconv-charset-length-cve-2007-4840.phpt
ext/iconv/tests/iconv_mime_decode-charset-length-cve-2007-4840.phpt
ext/iconv/tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt
ext/iconv/tests/iconv_set_encoding-charset-length-cve-2007-4840.phpt
ext/iconv/tests/iconv_strlen-charset-length-cve-2007-4840.phpt
ext/iconv/tests/iconv_strlen_error2.phpt
ext/iconv/tests/iconv_strpos-charset-length-cve-2007-4840.phpt
ext/iconv/tests/iconv_strpos_error2.phpt
ext/iconv/tests/iconv_strrpos-charset-length-cve-2007-4840.phpt
ext/iconv/tests/iconv_strrpos_error2.phpt
ext/iconv/tests/iconv_substr-charset-length-cve-2007-4783.phpt
ext/iconv/tests/iconv_substr_error2.phpt

index 84f24baabbde7986820a8ba4c3ab20d5ff850be8..90c209cbcbf00b548e6ac1bec4697f2448edf427 100644 (file)
@@ -1747,7 +1747,7 @@ static void _php_iconv_show_error(php_iconv_err_t err, const char *out_charset,
                        break;
 
                case PHP_ICONV_ERR_WRONG_CHARSET:
-                       php_error_docref(NULL, E_WARNING, "Wrong charset, conversion from \"%s\" to \"%s\" is not allowed",
+                       php_error_docref(NULL, E_WARNING, "Wrong encoding, conversion from \"%s\" to \"%s\" is not allowed",
                                  in_charset, out_charset);
                        break;
 
@@ -1799,7 +1799,7 @@ PHP_FUNCTION(iconv_strlen)
        if (charset == NULL) {
                charset = get_internal_encoding();
        } else if (charset_len >= ICONV_CSNMAXLEN) {
-               php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
+               php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
                RETURN_FALSE;
        }
 
@@ -1835,7 +1835,7 @@ PHP_FUNCTION(iconv_substr)
        if (charset == NULL) {
                charset = get_internal_encoding();
        } else if (charset_len >= ICONV_CSNMAXLEN) {
-               php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
+               php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
                RETURN_FALSE;
        }
 
@@ -1876,7 +1876,7 @@ PHP_FUNCTION(iconv_strpos)
        if (charset == NULL) {
                charset = get_internal_encoding();
        } else if (charset_len >= ICONV_CSNMAXLEN) {
-               php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
+               php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
                RETURN_FALSE;
        }
 
@@ -1937,7 +1937,7 @@ PHP_FUNCTION(iconv_strrpos)
        if (charset == NULL) {
                charset = get_internal_encoding();
        } else if (charset_len >= ICONV_CSNMAXLEN) {
-               php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
+               php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
                RETURN_FALSE;
        }
 
@@ -1996,7 +1996,7 @@ PHP_FUNCTION(iconv_mime_encode)
 
                if ((pzval = zend_hash_str_find_deref(Z_ARRVAL_P(pref), "input-charset", sizeof("input-charset") - 1)) != NULL && Z_TYPE_P(pzval) == IS_STRING) {
                        if (Z_STRLEN_P(pzval) >= ICONV_CSNMAXLEN) {
-                               php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
+                               php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
                                RETURN_FALSE;
                        }
 
@@ -2008,7 +2008,7 @@ PHP_FUNCTION(iconv_mime_encode)
 
                if ((pzval = zend_hash_str_find_deref(Z_ARRVAL_P(pref), "output-charset", sizeof("output-charset") - 1)) != NULL && Z_TYPE_P(pzval) == IS_STRING) {
                        if (Z_STRLEN_P(pzval) >= ICONV_CSNMAXLEN) {
-                               php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
+                               php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
                                RETURN_FALSE;
                        }
 
@@ -2077,7 +2077,7 @@ PHP_FUNCTION(iconv_mime_decode)
        if (charset == NULL) {
                charset = get_internal_encoding();
        } else if (charset_len >= ICONV_CSNMAXLEN) {
-               php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
+               php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
                RETURN_FALSE;
        }
 
@@ -2118,7 +2118,7 @@ PHP_FUNCTION(iconv_mime_decode_headers)
        if (charset == NULL) {
                charset = get_internal_encoding();
        } else if (charset_len >= ICONV_CSNMAXLEN) {
-               php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
+               php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
                RETURN_FALSE;
        }
 
@@ -2211,7 +2211,7 @@ PHP_FUNCTION(iconv)
        }
 
        if (in_charset_len >= ICONV_CSNMAXLEN || out_charset_len >= ICONV_CSNMAXLEN) {
-               php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
+               php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
                RETURN_FALSE;
        }
 
@@ -2241,7 +2241,7 @@ PHP_FUNCTION(iconv_set_encoding)
        }
 
        if (ZSTR_LEN(charset) >= ICONV_CSNMAXLEN) {
-               php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
+               php_error_docref(NULL, E_WARNING, "Encoding parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN);
                RETURN_FALSE;
        }
 
index a5f6743e81c44074ccd77d675d65d7d39b9beafd..84dc48a5e965f4c2a09b7298f56ce2f37144ba16 100644 (file)
@@ -2,22 +2,22 @@
 
 /** @generate-function-entries */
 
-function iconv_strlen(string $str, ?string $charset = null): int|false {}
+function iconv_strlen(string $string, ?string $encoding = null): int|false {}
 
-function iconv_substr(string $str, int $offset, ?int $length = null, ?string $charset = null): string|false {}
+function iconv_substr(string $string, int $offset, ?int $length = null, ?string $encoding = null): string|false {}
 
-function iconv_strpos(string $haystack, string $needle, int $offset = 0, ?string $charset = null): int|false {}
+function iconv_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): int|false {}
 
-function iconv_strrpos(string $haystack, string $needle, ?string $charset = null): int|false {}
+function iconv_strrpos(string $haystack, string $needle, ?string $encoding = null): int|false {}
 
-function iconv_mime_encode(string $field_name, string $field_value, array $preference = []): string|false {}
+function iconv_mime_encode(string $field_name, string $field_value, array $options = []): string|false {}
 
-function iconv_mime_decode(string $encoded_string, int $mode = 0, ?string $charset = null): string|false {}
+function iconv_mime_decode(string $string, int $mode = 0, ?string $encoding = null): string|false {}
 
-function iconv_mime_decode_headers(string $headers, int $mode = 0, ?string $charset = null): array|false {}
+function iconv_mime_decode_headers(string $headers, int $mode = 0, ?string $encoding = null): array|false {}
 
-function iconv(string $in_charset, string $out_charset, string $str): string|false {}
+function iconv(string $from_encoding, string $to_encoding, string $string): string|false {}
 
-function iconv_set_encoding(string $type, string $charset): bool {}
+function iconv_set_encoding(string $type, string $encoding): bool {}
 
 function iconv_get_encoding(string $type = "all"): array|string|false {}
index 3702e5739bdf25639bac3abd0aeba371c00a6dcd..619d52631fb6d9293fe99c8da539d460330ead12 100644 (file)
@@ -1,58 +1,58 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 4e26168b04450adf510a4e638184c46757679ac1 */
+ * Stub hash: 5d05deb60466c6e1ee73b44ad0b09a032bc8410e */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strlen, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
-       ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null")
+       ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
-       ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null")
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "0")
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strrpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_mime_encode, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, field_name, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, field_value, IS_STRING, 0)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, preference, IS_ARRAY, 0, "[]")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_mime_decode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
-       ZEND_ARG_TYPE_INFO(0, encoded_string, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0")
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_mime_decode_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, headers, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0")
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, charset, IS_STRING, 1, "null")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
-       ZEND_ARG_TYPE_INFO(0, in_charset, IS_STRING, 0)
-       ZEND_ARG_TYPE_INFO(0, out_charset, IS_STRING, 0)
-       ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, from_encoding, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, to_encoding, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iconv_set_encoding, 0, 2, _IS_BOOL, 0)
        ZEND_ARG_TYPE_INFO(0, type, IS_STRING, 0)
-       ZEND_ARG_TYPE_INFO(0, charset, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_get_encoding, 0, 0, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE)
index b05bd560d747817931a49c7b9e123e3f4247d93f..730870d4f71ebcdd88f178fcd2d2d480cf293ed6 100644 (file)
@@ -9,8 +9,8 @@ var_dump(iconv($a, "b", "test"));
 var_dump(iconv("x", $a, "test"));
 ?>
 --EXPECTF--
-Warning: iconv(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
+Warning: iconv(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
 bool(false)
 
-Warning: iconv(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
+Warning: iconv(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
 bool(false)
index d2e7f5713f8165b2940eaf1b7f74c65bba483a67..59a8668957d65d683ec39b092b05e2964cde7d0a 100644 (file)
@@ -8,5 +8,5 @@ $a = str_repeat("/", 9000000);
 var_dump(iconv_mime_decode("a", null, $a));
 ?>
 --EXPECTF--
-Warning: iconv_mime_decode(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
+Warning: iconv_mime_decode(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
 bool(false)
index f08d17754bec1c46542c0c77dde81f41c64d3e3d..818b599500adeb0cc2a1546d2d9d1ff85d8be53b 100644 (file)
@@ -8,5 +8,5 @@ $a = str_repeat("/", 9000000);
 var_dump(iconv_mime_decode_headers("a", null, $a));
 ?>
 --EXPECTF--
-Warning: iconv_mime_decode_headers(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
+Warning: iconv_mime_decode_headers(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
 bool(false)
index 40c87001e447633320e201bd7ba4a897d90c03f6..b0ba4016fb9491a66e3bd1ff3cf749b5b810dec0 100644 (file)
@@ -10,11 +10,11 @@ var_dump(iconv_set_encoding("output_encoding", $a));
 var_dump(iconv_set_encoding("internal_encoding", $a));
 ?>
 --EXPECTF--
-Warning: iconv_set_encoding(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
+Warning: iconv_set_encoding(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
 bool(false)
 
-Warning: iconv_set_encoding(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
+Warning: iconv_set_encoding(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
 bool(false)
 
-Warning: iconv_set_encoding(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
+Warning: iconv_set_encoding(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
 bool(false)
index 23f0b6f2eae8c59061837efaadd9f64f1fa4d4d4..f202d53625e1fa545277dcd7ee20f65f49db00fc 100644 (file)
@@ -8,5 +8,5 @@ $a = str_repeat("/", 9791999);
 var_dump(iconv_strlen(1, $a));
 ?>
 --EXPECTF--
-Warning: iconv_strlen(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
+Warning: iconv_strlen(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
 bool(false)
index 98c784c4142339a53ba5b2d8381704a302a78dbd..a4517f6e08f1338362ed5af5e3dfac9849384291 100644 (file)
@@ -23,5 +23,5 @@ var_dump(iconv_strlen($string, $encoding));
 --EXPECTF--
 *** Testing iconv_strlen() : error ***
 
-Warning: iconv_strlen(): Wrong charset, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d
+Warning: iconv_strlen(): Wrong encoding, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d
 bool(false)
index 0b378cb5030d038cb0e46462c2d2a26f09ca490c..6bfbde0546b5e9bdeec590bcff22171856c043c3 100644 (file)
@@ -8,5 +8,5 @@ $a = str_repeat("/", 9000000);
 var_dump(iconv_strpos("a", "b", 0, $a));
 ?>
 --EXPECTF--
-Warning: iconv_strpos(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
+Warning: iconv_strpos(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
 bool(false)
index 48a8eff69b3fa8dfb1b32a419666ed3649bff2ff..ac22704b2d95cca89a3e0404544b85b10b8a17e9 100644 (file)
@@ -24,6 +24,6 @@ echo "Done";
 --EXPECTF--
 *** Testing iconv_strpos() : error conditions ***
 
-Warning: iconv_strpos(): Wrong charset, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d
+Warning: iconv_strpos(): Wrong encoding, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d
 bool(false)
 Done
index f1492798001a540f8e3800ec26fa65050a8f87d2..554920cc26ea64ba517e8e1f75795fcc465cb4fc 100644 (file)
@@ -8,5 +8,5 @@ $a = str_repeat("/", 9000000);
 var_dump(iconv_strrpos("a", "b", $a));
 ?>
 --EXPECTF--
-Warning: iconv_strrpos(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
+Warning: iconv_strrpos(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
 bool(false)
index 4e9d925530fc093c57add8132287bd17de118c45..4e02ac4712fa8176fa81f1a3e75bd68d2fe702d8 100644 (file)
@@ -25,6 +25,6 @@ echo "Done";
 --EXPECTF--
 *** Testing iconv_strrpos() : error conditions ***
 
-Warning: iconv_strrpos(): Wrong charset, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d
+Warning: iconv_strrpos(): Wrong encoding, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d
 bool(false)
 Done
index 135c636718b0337228d1a38852ea7e62a90ccc04..77a29d0f21b8c50b3e4c77716704e0fe6367e202 100644 (file)
@@ -9,5 +9,5 @@ $b = str_repeat('/', 2798349);
 var_dump(iconv_substr($a, 0, 1, $b));
 ?>
 --EXPECTF--
-Warning: iconv_substr(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d
+Warning: iconv_substr(): Encoding parameter exceeds the maximum allowed length of 64 characters in %s on line %d
 bool(false)
index 5da2d183fd634c3daf10cc6dfa3a9610691260bd..858b89518694e98072d781b8d9fec4597b4df5ac 100644 (file)
@@ -25,6 +25,6 @@ echo "Done";
 --EXPECTF--
 *** Testing iconv_substr() : error conditions ***
 
-Warning: iconv_substr(): Wrong charset, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d
+Warning: iconv_substr(): Wrong encoding, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d
 bool(false)
 Done