pspp-dev
[Top][All Lists]
Advanced

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

Bug #33255 (Windows cannot open files with non-ascii names)


From: John Darrington
Subject: Bug #33255 (Windows cannot open files with non-ascii names)
Date: Thu, 8 Oct 2015 18:47:05 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

In addition to the changes I've submitted for review, I think the resolution to 
this 
problem involves work in src/data/make-file.c

The issue is, this module contains a lot of calls to posix file functions, such 
as 
open, rename, unlink etc.

These work in w32 so long as there are no non-ascii characters in the filenames.
To get other characters to work, we have to do two things:

1. Convert the filenames to UTF-16LE
AND
2. replace the function calls by their WideChar equivalents.

Step 2  however has caveats:

open --> _wopen is no problem.
unlink --> _wunlink is no problem.
rename --> _wrename will not work, because windows rename refuses to overwrite 
an existing file.  We will 
        have to use the native Windows function MoveFileW

Not sure about stat.


It may end up being easier to have a platform specific implementation of 
make-file.c

What do you think?


J'







-- 
Avoid eavesdropping.  Send strong encryted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


reply via email to

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