[sword-devel] Win32 FileMgr Subclass
Tom Sullivan
info at beforgiven.info
Sat Jul 18 14:42:55 EDT 2020
If you are able to use Python, it does a good job of making file
operations universal. For example, it converts /x/y/z.txt/n to
x\y\z.txt\r\n for Windows.
On 7/18/20 2:34 PM, David Haslam wrote:
> Paths and filenames may in theory include all manner of characters from
> non-Roman scripts.
> AFAIK, Only a few special characters are not allowed in the various file
> systems.
>
> We ought to avoid a systemic bias to the English language or even the
> Latin script when we design software.
>
> Easy to agree in principle but not so easy to implement successfully.
>
> Localisation of the UI is only part of the task.
>
> I wish you every success, Tobias.
>
> Best regards,
>
> David
>
>
> Sent from ProtonMail Mobile
>
>
> On Sat, Jul 18, 2020 at 18:53, Tobias Klein <contact at tklein.info
> <mailto:contact at tklein.info>> wrote:
>>
>> 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 <mailto:greg.hellings at gmail.com>
>> *Sent: *Samstag, 18. Juli 2020 15:58
>> *To: *SWORD Developers' Collaboration Forum
>> <mailto:sword-devel at crosswire.org>
>> *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
>> <mailto: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 <mailto:scribe at crosswire.org>
>> *Sent: *Samstag, 18. Juli 2020 14:42
>> *To: *SWORD Developers' Collaboration Forum
>> <mailto:sword-devel at crosswire.org>
>> *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
>> <mailto: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
>> <mailto:sword-devel at crosswire.org>
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>>
>
>
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________
>
> _______________________________________________
> 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
>
More information about the sword-devel
mailing list