pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with non-ascii filenames on a non utf-8 locale


From: Michel Boaventura
Subject: Re: Problem with non-ascii filenames on a non utf-8 locale
Date: Sat, 15 May 2010 08:37:44 -0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]