Skip to main content

Support for Unicode in Mustang ?

5 replies [Last post]
wahjava
Offline
Joined: 2005-08-10
Points: 0

Hi Project admins,
I've pointed out some of the Unicode problems in J2SE 6.0 (downloaded around February 2005).

* We can't pass Unicode (Wide Character) command-line arguments to the java launcher.

* We can't pass Unicode (Wide Character) command-line arguments to the processes launched by java (e.g. through java.lang.ProcessBuilder class)

Actually, the problem is due to the portability layer created for Unix/Windows stuff. e.g. In Unix (esp. Linux), Unicode command line arguments are passed as UTF-8 whereas in Windows, passed as UTF-16 characters.

And, it'll be better if there are separate DLLs for Windows (ANSI) and Windows (Unicode i.e. Windows NT), since ANSI function calls (on Windows NT based) first converts data into Wide Character String and then passed it to their Wide Version. So, memory is also wasting (for separate Unicode/ANSI buffers).

Well, I've not checked out the latest release due to the infrequent mine internet access. I'm sorry if these bugs are already fixed.

Thanx,
Ashish Shukla alias Wah Java !!

Wah Java !!

http://www.geocities.com/wah_java_dotnet/

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
lbarowski
Offline
Joined: 2005-08-03
Points: 0

For the first problem, it would be good to have a flag that indicates that the rest of the command line is encoded, in some way. Also, there could be a flag to specify the encoding of command line argument files, so a UTF-8 argument file could be used on "8 bit" Windows, for example.

fuerte
Offline
Joined: 2004-11-22
Points: 0

I think that I am facing this problem. I am using ProjectX with 1.6.0-beta2-b75, and I get the following error, when I give a file name "007 vaaran vyöhykkeellä (K15) 27-Mar.mpg" as a command line parameter:

No matching FileType found or file doesn't exist: '007 vaaran vy≈hykkeellS (K15) 27-Mar.mpg'

Clearly the non-English characters ö and ä have been encoded/decoded incorrectly.

Is there any workaround to this problem?

fuerte
Offline
Joined: 2004-11-22
Points: 0

The problem didn't occur when I used "for %%f in (*.mpg) do call convert1.bat %%f". It only happened when I had the file name stored in convert.bat (ANSI).

njs
Offline
Joined: 2004-03-11
Points: 0

For the latter problem, some components, such as file system, are already checking the Windows' native encoding on the fly, and calling the appropriate APIs (ANSI or Unicode).

AWT has also dealt with this issue using Microsoft's MSLU technology, where the AWT is working in Unicode (and thus calling W version APIs on 2000/XP systems), and MSLU takes care of string conversion on Windows 98.

wahjava
Offline
Joined: 2005-08-10
Points: 0

The above problem is in Windows version.