]> granicus.if.org Git - php/commitdiff
Don't bother with conversion when the converter is already UTF8
authorSara Golemon <pollita@php.net>
Fri, 5 Jan 2007 17:29:30 +0000 (17:29 +0000)
committerSara Golemon <pollita@php.net>
Fri, 5 Jan 2007 17:29:30 +0000 (17:29 +0000)
ext/session/mod_files.c

index ee4e23fd780fa1b7740f22841a3fa53cbacf279d..32f8abcc364cf2ec01f8dc3dc25c8a67a5019e7e 100644 (file)
@@ -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;