Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312125 - Profile java application launch should use DebugPlugin.ATTR_CONSOLE_ENCODING
Summary: Profile java application launch should use DebugPlugin.ATTR_CONSOLE_ENCODING
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Mike Reid CLA
QA Contact: Kathy Chan CLA
URL:
Whiteboard: closed472
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-07 16:24 EDT by Mike Reid CLA
Modified: 2016-05-05 11:02 EDT (History)
1 user (show)

See Also:


Attachments
patch (6.52 KB, patch)
2010-05-07 16:28 EDT, Mike Reid CLA
no flags Details | Diff
patch2 (6.39 KB, patch)
2010-05-17 09:19 EDT, Mike Reid CLA
no flags Details | Diff
Updated patch against 4.7.1 (5.83 KB, patch)
2010-11-01 10:59 EDT, Mike Reid CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Reid CLA 2010-05-07 16:24:49 EDT
See bug 228936 for some history.

Currently all console output from a profiled Java application is converted to the system's default encoding. So for example if a Java application outputs Japanese characters, then on an English Windows system the characters will show up as ?.

Supporting different character sets can be achieved by setting the file.encoding system property. This is the approach taken by the JDT launch implementation, storing the encoding in the DebugPlugin.ATTR_CONSOLE_ENCODING attribute of the launch config. JDT chooses a sensible default based on the encoding of the file where main() resides. 

For parity with the JDT launch, we should pass -Dfile.encoding=<value of ATTR_CONSOLE_ENCODING>. By doing so we can support the display of any character set supported by the workbench's JVM.
Comment 1 Mike Reid CLA 2010-05-07 16:28:03 EDT
Created attachment 167565 [details]
patch

Attached patch implements the needed changes.
Comment 2 Mike Reid CLA 2010-05-17 09:19:24 EDT
Created attachment 168722 [details]
patch2

Updated patch to remove mention of wrong bugzille #
Comment 3 Mike Reid CLA 2010-05-17 09:22:27 EDT
Jon, Kathy,

Can this go into 4.7.0 or should we wait for 4.7.1?

This is an enhancement I found while working on 308169, so as far as I know it is not affecting anybody.
Comment 4 Mike Reid CLA 2010-05-25 09:43:34 EDT
Notes on further testing:

- With an External Java launch on OS/390 the behaviour is unchanged. i.e. adding -Dfile.encoding seems to have no effect on the output. So there is no improvement, but does not seem to have any negative impact.

- External Java launch on Linux platform does seem to benefit from the improvement; if encoding is correctly specified then proper national language characters can be output in profiling mode.
Comment 5 Kathy Chan CLA 2010-05-25 14:23:24 EDT
Deferring to TPTP 4.7.1.
Comment 6 Mike Reid CLA 2010-11-01 10:59:56 EDT
Created attachment 182147 [details]
Updated patch against 4.7.1
Comment 7 Mike Reid CLA 2010-11-01 11:02:47 EDT
Missed this in 4.7.1 cycle. Checked into HEAD and resolving for 4.7.2 cycle.
Comment 8 Mike Reid CLA 2011-01-14 15:07:09 EST
Verified in TPTP-4.7.2-201101121900.
Comment 9 Kathy Chan CLA 2011-02-11 14:56:38 EST
Closing in TPTP 4.7.2 on behalf of the originator/owner.
Comment 10 Kathy Chan CLA 2011-02-11 14:57:30 EST
Closing.