updated for version 7.0054
diff --git a/src/fileio.c b/src/fileio.c
index 328431a..c3aef90 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1333,10 +1333,19 @@
 		 * If there is conversion error or not enough room try using
 		 * another conversion.
 		 */
-		if ((iconv(iconv_fd, (void *)&fromp, &from_size, &top, &to_size)
+		while ((iconv(iconv_fd, (void *)&fromp, &from_size,
+							       &top, &to_size)
 			    == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL)
 						  || from_size > CONV_RESTLEN)
-		    goto rewind_retry;
+		{
+		    if (!keep_dest_enc)
+			goto rewind_retry;
+		    /* Ignore a byte and try again. */
+		    ++fromp;
+		    --from_size;
+		    *top++ = '?';
+		    --to_size;
+		}
 
 		if (from_size > 0)
 		{