From 851a151712dea0665b6f9dadf82f29513f473e35 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Fri, 5 Jan 2007 17:29:30 +0000 Subject: [PATCH] Don't bother with conversion when the converter is already UTF8 --- ext/session/mod_files.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.50.1