This is the mail archive of the java-patches@gcc.gnu.org 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 for Review: Replace "Unicode to UTF8 conversions" with"Unicode to 'Win32 locale' conversions" when sending/receiving file namesto/from Win32 API.


Hi Mohan,

the patch is not only about tables. The UTF-16 component that uses win32 api W-functions (not yet posted) does not require those tables (but would work on win9x only with the compatibility layer).

Mohan Embar wrote:
- currently, we link it with mingw-runtime which links with msvcrt.dll which
  would probably be subject to the same licensing issues

Msvcrt.dll is in every windows distribution and UNICOWS.DLL is not. But I agree with you that UNICOWS.DLL can be used under win32 OS. The way it is distributed might be another issue (not only a licensing issue)...


We can remove all the tables and use only win32 api W-functions in libgcj. We can reduce the patch to the W-functions version (version 2 of the patch -- not published yet). But it seems that we would have to link libgcj against UNICOWS.LIB (Mohan? Ranjit? anyone?).

Anyway... Are you suggesting that FSF (or even the mingw project) should distribute Microsoft's closed source UNICOWS.DLL along side the open source?!? I dont think so...

One thing is to use win32 api dlls (those are included with the OS), other thing is to add dlls to the distribution!...

- it would eliminate the large character tables and defer this to MS code

That code (UNICOWS.DLL) would have to go along with your application (and would contain equivalent tables)... It would also contain many W-functions that are not included in Win9x and that you don't need to use in Java!


For a second opinion, you can read the section "But there are some disadvantages" on the link (from your own P.S):
http://porting.openoffice.org/servlets/ReadMsg?msgId=116287&listName=dev



- it would be an issue on Win9X only, which is hopefully eventually going
  the way of the dinosaur

Are you suggesting not to support win9x at all on this matter? If so, you don't need any tables or compatibility layers!...

I would like to see Win9x supported... but then again I can use the tables on my own... :/


This wouldn't solve the problem for Posix, though. João: I thought that your
solution addressed Windows-specific character sets. Is that correct? I haven't
looked at the patch it detail.

It is correct. But the problem, as stated by Tom Tromey, is not only about those tables (those are the least of it -- and I agree that they should be removed if there are alternatives)... It is about the replacement of Unicode/UTF-8 conversion for an adequate conversion for each platform.
We would have to evaluate the situation there. But the problem seems to exist. Do we have iconv available in all Posix systems? If so, there is no need for extra tables for Posix (I think that iconv correctly implements MS tables -- useful for accessing FAT and NTFS from Linux). Nevertheless you do have to modify that code for it to work with iconv...



João



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