History log of /PHP-8.0/ext/iconv/iconv.c (Results 1 – 25 of 318)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 30f4c725 12-Apr-2022 Christoph M. Becker

Fix GH-8218: ob_end_clean does not reset Content-Encoding header

The fix for GH-7953 introduced a regression by being to deliberate
adding the respective headers. These must only be add

Fix GH-8218: ob_end_clean does not reset Content-Encoding header

The fix for GH-7953 introduced a regression by being to deliberate
adding the respective headers. These must only be added, if the
handler starts, but is not finalizing.

Closes GH-8353.

show more ...


# 86c196ba 03-Feb-2022 Christoph M. Becker

Fix GH-7980: Unexpected result for iconv_mime_decode

We need to reset the shift state right after conversion, to cater to
potenially following plain encodings. Also, there is no need to

Fix GH-7980: Unexpected result for iconv_mime_decode

We need to reset the shift state right after conversion, to cater to
potenially following plain encodings. Also, there is no need to reset
the shift for plain encodings, because these are not state-dependent.

Closes GH-8025.

show more ...


# 9bd468da 20-Jan-2022 Christoph M. Becker

Fix GH-7953: ob_clean() only does not set Content-Encoding

If an output handler has not yet been started, calling `ob_clean()`
causes it to start. If that happens, we must not forget to

Fix GH-7953: ob_clean() only does not set Content-Encoding

If an output handler has not yet been started, calling `ob_clean()`
causes it to start. If that happens, we must not forget to set the
`Content-Encoding` and `Vary` headers.

Closes GH-7960.

show more ...


Revision tags: php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1
# a4331a67 29-Sep-2020 Nikita Popov

Update iconv parameter names

And rename charset to encoding, including inside error messages.

Closes GH-6234.


Revision tags: php-7.4.11, php-7.3.23
# 42168304 28-Sep-2020 Nikita Popov

Consistently handle out of bounds offsets in iconv_strpos()

Same as in all other strpos() style functions, throw ValueError on
out of bounds offset.


# 978a44c9 28-Sep-2020 Nikita Popov

Simplify iconv_strpos implementation

Use a separate "reverse" flag to determine search direction,
using offset == -1 to indicate this is is confusing. I initially
thought the code wa

Simplify iconv_strpos implementation

Use a separate "reverse" flag to determine search direction,
using offset == -1 to indicate this is is confusing. I initially
thought the code was trying to handle negative offsets.

Also deduplicate the forward and reverse cases, they really only differ
in one place.

show more ...


# 9e3f3526 28-Sep-2020 Nikita Popov

Throw warning for invalid iconv charset


# 13b791c7 22-Sep-2020 Nikita Popov

Normalize substr() behavior

Make the behavior of substr(), mb_substr(), iconv_substr() and
grapheme_substr() consistent when it comes to the handling of
out of bounds offsets. substr

Normalize substr() behavior

Make the behavior of substr(), mb_substr(), iconv_substr() and
grapheme_substr() consistent when it comes to the handling of
out of bounds offsets. substr() will now always clamp out of
bounds offsets to the string boundary. Cases that previously
returned false will now return an empty string. This means that
substr() itself *always* returns a string now (like mb_substr()
already did before.)

Closes GH-6182.

show more ...


Revision tags: php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1
# 4a2ae841 07-Sep-2020 Dmitry Stogov

Add "const". Move constant strings to read-only memory.


Revision tags: php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1
# 7bd1d703 07-Aug-2020 Nikita Popov

Remove PHP_ICONV_H_PATH

Directly include <iconv.h> instead, now that the giconv.h
distinction no longer exists.


Revision tags: php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20
# 2b5de6f8 01-Jul-2020 Max Semenik

Remove proto comments from C files

Closes GH-5758


Revision tags: php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1
# 9cc24baa 20-May-2020 George Peter Banyard

Fix [-Wundef] warning in Iconv extension


Revision tags: php-7.4.6, php-7.2.31
# 3ebce8e9 02-May-2020 Máté Kocsis

Fix UNKNOWN default values in various extensions

Closes GH-5514


Revision tags: php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17
# 5322de1b 04-Apr-2020 Máté Kocsis

Generate functions entries from stubs for another set of extensions

Closes GH-5351


Revision tags: php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29
# 32a26443 16-Mar-2020 Christoph M. Becker

Fix #79200: Some iconv functions cut Windows-1258

To cater to potentially state-dependent encodings, we have to reset the
conversion descriptor into its initial shift state to properly f

Fix #79200: Some iconv functions cut Windows-1258

To cater to potentially state-dependent encodings, we have to reset the
conversion descriptor into its initial shift state to properly finish
the conversion. Furthermore, state-dependent encodings may not show
progress when comparing `in_left` before and after the conversion; we
rather have to see whether `out_left` has decreased. Also we have to
cater to the fact that the final potentially state resetting call does
not signal failure, but we still have to break respective loops
afterwards.

show more ...


# 66d8d0c7 17-Mar-2020 Christoph M. Becker

Drop support for iconv without proper errno setting

It is hard to impossible to work around iconv() implementations which
do not properly set errno according to POSIX. We therefore do n

Drop support for iconv without proper errno setting

It is hard to impossible to work around iconv() implementations which
do not properly set errno according to POSIX. We therefore do no
longer allow to build against such iconv() implementations.

Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com>

show more ...


Revision tags: php-7.3.16, php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28
# e4e1746b 05-Feb-2020 George Peter Banyard

Remove unnecessary condition as always true.

ZSTR_LEN(str) is an unsigned integer therefor it is always greater
or equal than 0.

Detected by -Wtype-limits compiler warning.


Revision tags: php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14, php-7.3.14RC1, php-7.4.2RC1
# aadd3aae 03-Jan-2020 Máté Kocsis

Use RETURN_THROWS() in various places


# 34570372 31-Dec-2019 Máté Kocsis

Use RETURN_THROWS() during ZPP in most of the extensions

Except for some bigger ones: reflection, sodium, spl


Revision tags: php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11
# e6d3146b 21-Oct-2019 Colin O'Dell

Accept null lengths for substr functions()

If a null $length is passed to any of these functions, behave as if no
parameter was passed:

- substr()
- substr_count()
-

Accept null lengths for substr functions()

If a null $length is passed to any of these functions, behave as if no
parameter was passed:

- substr()
- substr_count()
- substr_compare()
- iconv_substr()

show more ...


Revision tags: php-7.4.0RC4
# 195c2008 08-Oct-2019 Christoph M. Becker

Fix #78642: Wrong libiconv version displayed

The high byte of `_libiconv_version` specifies the major version; the
low byte the minor version.


Revision tags: php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3
# 5d6e923d 24-Sep-2019 Gabriel Caruso

Remove mention of PHP major version in Copyright headers

Closes GH-4732.


Revision tags: php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9
# bba7f38c 23-Aug-2019 Christoph M. Becker

Don't explicitly set return value on ZPP failure in ext/iconv

Failing ZPP throws as of PHP 8.0.0, so explicitly setting a return
value is useless, and also slightly confusing.


# d4203361 23-Aug-2019 Christoph M. Becker

Add ext/iconv stubs


Revision tags: php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20, php-7.4.0alpha2, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2, php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1
# 457392fa 05-Jun-2019 Dmitry Stogov

Cheaper checks for exceptions thrown from __toString()


12345678910>>...13