Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350918

Summary: [java launching] Applet parameters containing unusual characters confuse eclipse
Product: [Eclipse Project] JDT Reporter: Dave Dyer <ddyer>
Component: DebugAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.7   
Target Milestone: 3.8 M7   
Hardware: All   
OS: All   
Whiteboard:

Description Dave Dyer CLA 2011-07-01 06:41:39 EDT
Build Identifier:  20100917-0705

Try passing an 8 character applet parameter like 'foo'"Bar"  
to an applet using the eclipse debuging environment.   Or if you
are more adventurous, try some chinese text, such as 您好.

You won't get anything reasonable as the parameter value when you call
getParam

It may be the case that this is an ill-defined area in general, but
even so, if unexpected or unpredictable results are "expected" it would
be better not to allow GIGO


Reproducible: Always

Steps to Reproduce:
experiment with unusual applet parameters.
Comment 1 Dani Megert CLA 2011-07-05 03:09:32 EDT
Can you add a test snippet/case?
Comment 2 Dave Dyer CLA 2011-07-05 12:09:31 EDT
the test cases are right there, use 'foo'"Bar" as a parameter
name, or 您好
Comment 3 Dave Dyer CLA 2011-07-05 12:10:13 EDT
the test cases are right there, use 'foo'"Bar" as a parameter
value, or 您好
Comment 4 Dani Megert CLA 2011-07-06 02:05:30 EDT
(In reply to comment #3)
> the test cases are right there, use 'foo'"Bar" as a parameter
> value, or 您好

But where do you pass it? Code? Launch Config? Variables view?
Comment 5 Dave Dyer CLA 2011-07-06 02:08:35 EDT
applet parameters in a launch config
Comment 6 Dani Megert CLA 2011-07-07 03:24:07 EDT
The temporary HTML page is not correctly generated i.e. it does not encode special HTML characters.
Comment 7 Dani Megert CLA 2012-03-28 07:35:40 EDT
Fixed in master: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=5915de3bdf921e09f7ef075a384585041068bf22


Note that for strings like 'foo'"Bar" we have to encode the quotes and since the applet viewer does not support most HTML stuff, this will appear as:
&#39;foo&#39;&quot;Bar&quot;

The 您好 case is fixed by using the same encoding to generate the page as specified in the applet launch configuration.