Well, I've fixed my VM. Here is what I've found about this bug:

Pspp really thinks the .sav file is a syntax because any_reader_may_open returns false.
It returns false because try_detect and fn_open also return false.
Finally, fn_open returns false because the fopen call (file-name.c:225) returns NULL.

To test this, I've put a printf before the fopen, which prints each char of the filename as a integer. Then I try to open the same file using both File -> Open and the terminal. This
is what I get:

wrong: 92 104 111 109 101 92 109 105 99 104 101 108 92 110 195 163 111 46 115 97 118 right: 92 104 111 109 101 92 109 105 99 104 101 108 92 110 227 111 46 115 97 118 means: \ h o m e \ m i c h e l \ n atilde o . s a v

The two strings only differs on the non-ascii char. Notice that on the wrong string two bytes are used to represent the atilde. This happens on Unicode. The right string only uses one, which happens on ISO8859-1. So pspp is trying to open the file using a
utf8 string when it shouldn't.

Regards,

Michel

_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to