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: New version of "UTF-16 to 'Win32 locale' conversions"and filenames (replacing convertion tables with Win32 API calls)


Bryce McKinlay wrote:

Rather than making up a C++ interface, I'd prefer to see wrappers around these native conversion routines implemented with a gnu.gcj.convert interface - or even better, java.nio.charset. Charset conversions need to be done in various places besides java.io.File (AWT, for example), and it would be great to have access to them from Java code. It also means we won't have to write separate code for POSIX and Win32 everywhere to do the character conversions. A different win32 java.nio.charset provider could be registered at startup depending on whether 9x or NT is used, avoiding the extra indirection.

This is the approach I intend to take for the posix File implementation when time allows.


This seems an excelent approach!
The same kind of approach has been taken for SWT (see OS.java in org.eclipse.internal.win32).


Since MultiByteToWideChar()/WideCharToMultiByte() functions are also available in NT/2000/XP, I cannot find any reason to loose time with a temporary patch using a C++ interface. Therefore I shall only propose a temporary patch for GCC 3.4, using A-functions.

João



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