From: Sara Golemon Date: Fri, 5 Jan 2007 17:29:30 +0000 (+0000) Subject: Don't bother with conversion when the converter is already UTF8 X-Git-Tag: RELEASE_1_0_0RC1~390 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=851a151712dea0665b6f9dadf82f29513f473e35;p=php Don't bother with conversion when the converter is already UTF8 --- diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index ee4e23fd78..32f8abcc36 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -121,8 +121,8 @@ static char *ps_files_path_create(char *buf, size_t buflen, ps_files *data, cons n += key_len; buf[n] = '\0'; - if (UG(unicode) && UG(filesystem_encoding_conv)) { - /* If there's a cheap way to see if filesystem_encoding_conv happens to be utf8, we should skip this reconversion */ + if (UG(unicode) && UG(filesystem_encoding_conv) && + ucnv_getType(UG(filesystem_encoding_conv)) != UCNV_UTF8) { char *newbuf = NULL; int newlen; UErrorCode status = U_ZERO_ERROR;