From aa3e1a5079053b45611d421d12e3f276dd2a461a Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 28 Mar 2009 20:50:51 +0900 Subject: [PATCH] Convert encoding even if encodings are identical. recode_string must continue, even if the source and target encodings are identical, because invalid bytes in the source string need to become '?' to avoid later problems. --- src/libpspp/i18n.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libpspp/i18n.c b/src/libpspp/i18n.c index b323bf85..a07949f3 100644 --- a/src/libpspp/i18n.c +++ b/src/libpspp/i18n.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -88,9 +88,6 @@ recode_string (const char *to, const char *from, if (from == NULL) from = default_encoding; - if ( 0 == strcmp (to, from)) - return xstrndup (text, length); - for ( outbufferlength = 1 ; outbufferlength != 0; outbufferlength <<= 1 ) if ( outbufferlength > length) break; -- 2.30.2