encoding-guesser: Fix bug in parsing fallback encodings. 20130805030512/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 5 Aug 2013 02:42:29 +0000 (19:42 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 5 Aug 2013 02:42:29 +0000 (19:42 -0700)
commit90f52783e836aa7bd1c4da6f58f7ab951cd7a3da
tree10406a17bd34d876da091fa0fbbee6167e425b77
parentf1e84802839683eba11166a85e2f9fb5d49f3490
encoding-guesser: Fix bug in parsing fallback encodings.

The encoding guesser originally used UTF-8 as a fallback in situations
where it had already figured out that UTF-8 couldn't be right.  Commit
d6c75296 (encoding-guesser: Fall back to windows-1252 when UTF-8 can't be
right.) fixed this, by falling back to window-1252 when UTF-8 was known to
be wrong, but it also introduced a bug where this change to the fallback
encoding occurred even when UTF-8 had not be determined to be wrong.  This
commit fixes that problem.

Reported by John Darrington.
src/libpspp/encoding-guesser.c