History log of /php-src/ext/iconv/iconv.c (Results 1 – 25 of 352)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 2447cb25 19-Apr-2024 Gina Peter Banyard

main/output.c: Refine int return type to bool or zend_result (#13997)


# fc8d5c72 19-Aug-2023 David Carlier

ext/iconv: fix build for netbsd.

NetBSD still adopts the old iconv signature for buffer inputs.
The next release will too so we can assume it will remain that way for
a while.

ext/iconv: fix build for netbsd.

NetBSD still adopts the old iconv signature for buffer inputs.
The next release will too so we can assume it will remain that way for
a while.

Close GH-12001

show more ...


# d5ad7510 08-Jun-2023 George Peter Banyard

More usage of known zend_str instead of C string (#11381)


# 9d5f2f13 20-Mar-2023 Ilija Tovilo

Use new ZSTR_INIT_LITERAL macro (#10879)


# a60c6ee0 15-Jan-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Mark constant static arrays in function bodies actually as const (#10325)


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1
# 4df3dd76 08-Jul-2022 Arnaud Le Blanc

Reduce memory allocated by var_export, json_encode, serialize, and other (#8902)

smart_str uses an over-allocated string to optimize for append operations. Functions that use smart_str tend

Reduce memory allocated by var_export, json_encode, serialize, and other (#8902)

smart_str uses an over-allocated string to optimize for append operations. Functions that use smart_str tend to return the over-allocated string directly. This results in unnecessary memory usage, especially for small strings.

The overhead can be up to 231 bytes for strings smaller than that, and 4095 for other strings. This can be avoided for strings smaller than `4096 - zend_string header size - 1` by reallocating the string.

This change introduces `smart_str_trim_to_size()`, and calls it in `smart_str_extract()`. Functions that use `smart_str` are updated to use `smart_str_extract()`.

Fixes GH-8896

show more ...

Revision tags: php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30
# 7e6301cd 06-Jun-2022 Máté Kocsis

Declare ext/iconv constants in stubs (#8714)

Revision tags: php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1
# e063243d 25-Apr-2022 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

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


Revision tags: php-8.0.18, php-8.1.5
# 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 ...

Revision tags: php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28
# 49466af4 07-Feb-2022 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix GH-7980: Unexpected result for iconv_mime_decode


# 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 ...

# 8009b216 03-Feb-2022 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

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


Revision tags: php-8.1.3RC1, php-8.0.16RC1
# 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.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29
# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs

Revision tags: php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1
# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

Revision tags: php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1
# 09efad61 08-Apr-2021 George Peter Banyard

Use zend_string_equals_(literal_)ci() API more often

Also drive-by usage of zend_ini_parse_bool()

Closes GH-6844

Revision tags: php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, 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
# 5caaf40b 29-Sep-2020 George Peter Banyard

Introduce pseudo-keyword ZEND_FALLTHROUGH

And use it instead of comments

# 3e01f5af 15-Jan-2021 Nikita Popov

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.

show more ...

# 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.

12345678910>>...15