This is the mail archive of the mailing list for the Java project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: New version of "UTF-16 to 'Win32 locale' conversions" and filenames (replacing convertion tables with Win32 API calls)

Hi João,

>>If you post a patch for 3.4 and a testcase, I will put out a binary
>>on my website which incorporates this patch, even if the patch might
>>not make it to the mainline. 
>I'll do that (using only A functions -- less things to modify and less 
>things to test).

Thank <i>you</i>.

>>I'd be interested in initially exploring a solution which invokes the
>>W file functions on WinNT and the A file functions on Win9x.
>I have a draft for something like that (I didn't finish debuging W calls 
>sections -- I can recall a segmentation fault somewhere). As the patch 
>is, it chooses between A and W functions "on-the-fly", based on platform 
>detection. This leeds to code duplication...
>I think that you would like to do the choice as a build option (or, at 
>least, I might be happy with this option...). Or, probably, support only 
>W functions (I don't blame you for that and I can always build my own 

This is what I was thinking: have an interface (actually a C++ abstract base
class) called IJvWin32API and two concrete implementations: JvWin9XAPI and
JvWinNTAPI. At startup time, the runtime initializes a global IJvWin32API
pointer with one of the concrete implementations based on the platform. We wouldn't
put all of the API in here, only the ones with string-related things.
IJvWin32API would (of course) have a UNICODE interface.

This would introduce one extra level of indirection per API call, but who
cares. This would also lead to some duplication, but since we're mirroring the
OS API here, it would only be a couple of lines per method implementation.

>>Do you want to do this investigation?
>I can do it (time permitting). For me, it would be just to adapt the old 
>patch (and debug it).
>> If not, would you have any objections
>>to my looking into it (time permitting)?
>I have no objections if you (or anyone else) would like to finish this 
>But we would both loose time.
>I think I can propose something before the end of  September.
>Would you wish to do it yourself sooner?

If you want to do this, that would be wonderful. The less work for me,
the better (for me :)).

-- Mohan

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]