From d8a22d0b05234697825e6f0ea8589429b7c4a6cf Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Tue, 17 Mar 2009 05:31:04 +0000 Subject: [PATCH] - MFH: Make iconv filter accept '.' as the delimiter between encoding names as well as '/'. It's impossible to specify the filter in php://filter without this fix. # I hope this to be merged to 5.2 as well. This doesn't break BC as there is # no such encoding name that contains '.'. (Andif there were to be such one, # the filter is failed in the first place since it also uses '.' for the # delimiter between the filter name and the "from" encoding name. --- ext/iconv/iconv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 6fb0c9a4f6e..c3b392c6f47 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -2759,7 +2759,7 @@ static php_stream_filter *php_iconv_stream_filter_factory_create(const char *nam return NULL; } ++from_charset; - if ((to_charset = strchr(from_charset, '/')) == NULL) { + if ((to_charset = strpbrk(from_charset, "/.")) == NULL) { return NULL; } from_charset_len = to_charset - from_charset;