JDK-4011899 : Java argv[] can't get some character encoding other than ascii.
  • Type: Bug
  • Component: other-libs
  • Sub-Component: other
  • Affected Version: 1.1
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 1996-10-29
  • Updated: 1997-10-23
  • Resolved: 1997-10-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.1 1.1Fixed
Related Reports
Relates :  
Relates :  
Description
Java interpreter can't recognize any character encoding as command line
arguments. So argv[] which is given to application doesn't have correct
unicode strings for command line arguments inputted by user.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.1 FIXED IN: 1.1 INTEGRATED IN: 1.1
14-06-2004

EVALUATION [naoyuki 11/5/96] Encoding conversion should be applied to argument strings.
11-06-2004

SUGGESTED FIX In case of Solaris, - solaris/java/javai/javai.c HArrayOfString * commandLineArguments(int argc, char **argv, struct execenv *ee) { HArrayOfString *ret = (HArrayOfString *) ArrayAlloc(T_CLASS, argc); if (ret == 0) { OutOfMemory: SignalError(ee, JAVAPKG "OutOfMemoryError", 0); return 0; } /* Give the array a "type" */ unhand((HArrayOfObject *)ret)->body[argc] = (JHandle *)classJavaLangString; while (--argc >= 0) { char *s = argv[argc]; Thin point -> if ((unhand(ret)->body[argc] = makeJavaString(s, strlen(s))) == 0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ goto OutOfMemory; } return (HArrayOfString *) ret; } ***** The code modified ***** if((unhand(ret)->body[argc] = makeJavaStringFromPlatformCString(s, strlen(s))) == 0) Note: makeJavaStringFromPlatformCString() is included in utilities and was made by naoyuki.
11-06-2004