mirror of
https://github.com/php/php-src.git
synced 2026-04-20 22:41:20 +02:00
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.
19 lines
499 B
PHP
19 lines
499 B
PHP
--TEST--
|
|
Bug #79200 (Some iconv functions cut Windows-1258)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('iconv')) die('skip iconv extension not available');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
var_dump(iconv_mime_decode('=?windows-1258?Q?test=20test?=', 0, 'UTF-8'));
|
|
var_dump(iconv_strlen('test test', 'WINDOWS-1258'));
|
|
var_dump(iconv_strpos('test test', 'test test', 0, 'WINDOWS-1258'));
|
|
var_dump(iconv_substr('test test', 0 , 9, 'WINDOWS-1258'));
|
|
?>
|
|
--EXPECT--
|
|
string(9) "test test"
|
|
int(9)
|
|
int(0)
|
|
string(9) "test test"
|