u8-istream: Fix reading UTF-16 and UTF-32 files. 20130425010503/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 25 Apr 2013 05:26:06 +0000 (22:26 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 25 Apr 2013 05:27:10 +0000 (22:27 -0700)
commit7caed4c8228cf00ed5061b474f32a47b5ff7c40f
treeabd562097f50986bb700fea11fb987d0b0b8f910
parent0697a4277a80981c438518e844ae8174ea9b8453
u8-istream: Fix reading UTF-16 and UTF-32 files.

Before this commit, u8_istream_for_fd() would obtain the correct encoding
from encoding_guess_head_encoding() for UTF-16 and UTF-32 files, and then
it would ignore it and use the default encoding returned by
encoding_guess_parse_encoding().  This commit fixes the problem.
src/libpspp/u8-istream.c
tests/libpspp/u8-istream.at