[bt-devel] Unicode impl on Windows (was Some pictures)

Troy A. Griffitts scribe at crosswire.org
Thu Feb 26 09:59:53 MST 2009


Dear Matthew,

I'm sorry, but I don't remember you telling me that BibleCS did not work 
for you.  I just tested under Windows XP and it works fine for me.

I'm sorry to disagree technically with you again (nothing personal) but 
getenv and open should be consistently implemented on whatever platform 
for which a C compiler is attempting to build working executables.  
These methods were created long before Unicode, but now on Unicode-aware 
systems compilers need to make a choice what to do as 'The Right Thing' 
and open should AT THE VERY LEAST, be consistent with getenv.  If I 
receive a PATH NAME from getenv as a char *, then I should be able to 
pass that returned value to open.  I don't care if the impl uses 'short 
8.3' DOS name alternatives, or UTF-8 (of course the best solution), they 
should be consistent.  The OpenFileW system call is a brute force method 
to do the right thing on windows, which is fine to get something 
working, but the implementation of the C call 'open' should call the 
correct system call (OpenFileW, CreateFileW, whatever) on whatever 
operating system for which it is implemented.

In summary, the whole point of a compiler even supplying an 
implementation of the stdlib C calls is to allow a developer to avoid 
calling OS level calls like the Win32 API direct calls you cite.

Do you understand my point?

    -Troy.







Matthew Talbert wrote:
>> I just tried BibleCS (Borland's impl) and it works fine with SWORD_PATH set to d:/Žibřický
>>     
>
> Oh, for the record (and as I already told you privately), BibleCS
> definitely did *not* work with SWORD_PATH set to M:/SwordŽibřický.
> This is an issue that can vary depending on the OS, the locale, and
> the filesystem in use. Therefore, as I've said, the wide character api
> is the *only* way to assure correct operation across all of these
> variables.
>
> Matthew
>
> _______________________________________________
> bt-devel mailing list
> bt-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/bt-devel
>   




More information about the bt-devel mailing list