[sword-devel] Win32 FileMgr Subclass

Tobias Klein contact at tklein.info
Sat Jul 18 13:53:30 EDT 2020


Thanks Greg & Troy for pointing out these potential issues. No, I have not tested my code properly with non-ascii characters in paths / file names.

I suppose this would particularly be an issue if the username has certain characters that cause issues? (applicable for the ~/.sword directory). And then also, when arbitrary folders are added to SWMgr?!

I’ll do some testing in this area!

I wonder whether libraries like Qt or Boost have solved these kind of issues somehow …

Best regards,
Tobias

From: Greg Hellings
Sent: Samstag, 18. Juli 2020 15:58
To: SWORD Developers' Collaboration Forum
Subject: Re: [sword-devel] Win32 FileMgr Subclass

Tobias,

Has this been tested with file paths that contain characters outside of the basic ASCII code range? That's where current Sword fails. Not in fetching the data for the paths themselves, but the actual calls to fopen and friends, on Windows, do not understand non ASCII data.

It looks like your code would suffer similar to other Sword code, which eventually passes through the library's fopen calls.

On Sat, Jul 18, 2020, 08:24 Tobias Klein <contact at tklein.info> wrote:
Maybe not a full-fledged FileMgr class, but at least everything I need in Ezra Project at the moment:

https://github.com/tobias-klein/node-sword-interface/blob/master/src/sword_backend/file_system_helper.hpp
 
https://github.com/tobias-klein/node-sword-interface/blob/master/src/sword_backend/file_system_helper.cpp
 
It works on Windows, macOS and Linux.
 
Best regards,
Tobias
 
From: Troy A. Griffitts
Sent: Samstag, 18. Juli 2020 14:42
To: SWORD Developers' Collaboration Forum
Subject: [sword-devel] Win32 FileMgr Subclass
 
I know Greg has sent me a link to the patch you guys apply to get Xiphos 
to run well on Win32, but I have searched through all my past emails 
with every relevant term I can thing of, and still can't find it.  I am 
sorry,  Could you possibly sent that again? I think you guys were using 
glib routines.  If possible, I'd like to include something in SWORD more 
generic, possibly using native Win32 calls.  I've done something similar 
for a couple projects in the past and need to find all that code.  The 
only one I keep thinking of off the top of my head is swordreader's 
wince layer, which I believe is similar to win32 methods, but might need 
some adapting.
 
http://crosswire.org/svn/swordreader/trunk/src/Dll1/winceSword/src/
 
The Xiphos code would be very helpful, if not just for finding 
everyplace you needed to make a modification.  Thanks for any help 
finding it,
 
Troy
 
 
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
 
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20200718/4ffb05e6/attachment.html>


More information about the sword-devel mailing list