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.
/* 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
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;