Bug 138708 - [BiDi] [BIDI, ICU] Bidi3.2: Decimal points are not displayed correctly with com.icu.text.NumberFormat (ICU4J)
Summary: [BiDi] [BIDI, ICU] Bidi3.2: Decimal points are not displayed correctly with c...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 138707 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-26 14:28 EDT by Ahmed Farrag CLA
Modified: 2019-09-06 16:06 EDT (History)
10 users (show)

See Also:


Attachments
PerformanceExample.class (2.48 KB, application/octet-stream)
2006-04-26 14:29 EDT, Ahmed Farrag CLA
no flags Details
fig1 (9.97 KB, image/jpeg)
2006-04-26 14:29 EDT, Ahmed Farrag CLA
no flags Details
fig2 (9.32 KB, image/jpeg)
2006-04-26 14:29 EDT, Ahmed Farrag CLA
no flags Details
screen shot of sample view using NumberFormat from ICU 3.4.4.1 (12.86 KB, image/jpeg)
2006-04-28 11:05 EDT, Karice McIntyre CLA
no flags Details
screen shot of problem on Linux (8.62 KB, image/png)
2006-05-24 13:52 EDT, Karice McIntyre CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmed Farrag CLA 2006-04-26 14:28:47 EDT
OS: RHEL 4.0 with Arabic-Egypt locale
Build date: 04/24

Steps to recreate the problem:

1.Open the “Profiling and Logging perspective”.
2. Select the “Profile” drop-down button expand it and choose “Profile...”.
3. In the Profile dialog select “External Java Application” and create a new
configuration.
4. Change the name of the configuration to “LocalProfileTest” and  click
“Apply” to save changes.
5. On the Host tab select “localhost:10002 from the “Default Hosts” list
6. On the Main tab, browse for the attached "PerformanceExample.class" in the
<test_samples> directory to provide the name of the test application in the
“Class name” field.
7. Click “Profile” to launch the application.
8. Select the profiling agent  you are currently monitoring in the “Profiling monitor” view and from the context menu choose "open with"->"Execution Statistics".

Expected output:

The decimal point should be displayed in the "Execution Statistics" window as shown in fig1.

Actual output:

The decimal points are displayed as shown in fig2.
Comment 1 Ahmed Farrag CLA 2006-04-26 14:29:18 EDT
Created attachment 39568 [details]
PerformanceExample.class
Comment 2 Ahmed Farrag CLA 2006-04-26 14:29:35 EDT
Created attachment 39569 [details]
fig1
Comment 3 Ahmed Farrag CLA 2006-04-26 14:29:56 EDT
Created attachment 39570 [details]
fig2
Comment 4 Ahmed Farrag CLA 2006-04-26 14:30:44 EDT
*** Bug 138707 has been marked as a duplicate of this bug. ***
Comment 5 Eugene Chan CLA 2006-04-26 14:41:32 EDT
Is this happening on Linux only, or also on Windows? as I don't see the problem on Windows platform.
Comment 6 Ahmed Farrag CLA 2006-04-27 03:04:04 EDT
(In reply to comment #5)

yes, it is encountered on linux platform only
Comment 7 Eugene Chan CLA 2006-04-27 11:07:32 EDT
and the linux platform is setup to use '.' as decimal point in system properties? does anywhere else in Eclipse running on Linux show decimal point correctly? or it's just the statistical table views that is having the problem?
Comment 8 Eugene Chan CLA 2006-04-27 12:45:25 EDT
I can reproduce the problem on a Linux RHEL4.0 GTK machine with latest TPTP build 0624. I will investigate on the problem.
Comment 9 Eugene Chan CLA 2006-04-27 15:08:26 EDT
The problem is introduced by the usage of ICU4J

When double value are formatted with ICU4J NumberFormat, problem happens. 
If I roll back to java.text.NumberFormat, problem does not exist.
Please note that problem only happen on Linux-GTK bidi workbench.

To reproduce the problem, try create a sample 'SampleView' plugin project that packaged in workbench, in the view content provider getElements() method, return string that is format from a double value with the following method.

public static String formatTimeValue(double d)
{
	  	NumberFormat _decimalFormat = NumberFormat.getNumberInstance();
		_decimalFormat.setMaximumFractionDigits(6);
		_decimalFormat.setMinimumFractionDigits(6);		
	        return _decimalFormat.format(d);
}

passing bug to platform for correct component.
Comment 10 Karice McIntyre CLA 2006-04-27 15:52:56 EDT
What version of the plug-in com.ibm.icu is in your build?
Comment 11 Eugene Chan CLA 2006-04-27 15:56:29 EDT
the one I have in my workbench is 3.4.3

Manifest-Version: 1.0
Bundle-Name: %pluginName
Bundle-SymbolicName: com.ibm.icu.source; singleton=true
Bundle-Version: 3.4.3
Bundle-Localization: plugin
Bundle-Vendor: %providerName
Comment 12 Karice McIntyre CLA 2006-04-27 17:53:46 EDT
Doug, would this problem have been fixed in ICU 3.4.4 or is it a new bug?
Comment 13 Karice McIntyre CLA 2006-04-28 11:05:08 EDT
Created attachment 39779 [details]
screen shot of sample view using NumberFormat from ICU 3.4.4.1

This is how System.getTimeMillis() displays using the sample code provided against an updated version of ICU (Eclipse SDK RC2 will have this version).  Does it display correctly?
Comment 14 Eugene Chan CLA 2006-04-28 11:10:54 EDT
Ahmed, would you please answer Karice's question on comment #13? Thanks.
Comment 15 Ahmed Farrag CLA 2006-04-30 05:52:14 EDT
In reply to comment #13
Eugene, Karice 

I am really sorry for the delay in respone. The screen shot attached by Karice shows the correct display of decimal points.
Comment 16 Karice McIntyre CLA 2006-04-30 20:11:39 EDT
Marking as resolved since this is fixed with the newer version of ICU4J (3.4.4) which is available in Eclipse builds post-RC1a.
Comment 17 Ahmed Farrag CLA 2006-05-03 03:36:24 EDT
(In reply to comment #16)

>It shouldn't be marked as "RESOLVED WORKSFORME", it should be marked as "RESOLVED FIXED". We will be waiting for the new build to verify and close this bug.
Comment 18 Karice McIntyre CLA 2006-05-03 10:58:01 EDT
fixed
Comment 19 Ahmed Farrag CLA 2006-05-24 05:28:38 EDT
On eclipse RC4 build, this problem still persists. Reopening.
Comment 20 Karice McIntyre CLA 2006-05-24 11:11:55 EDT
Ahmned, what version of com.ibm.icu are you using?  You can check this in the About dialog by clicking the Plugin Details button.  
Comment 21 Ahmed Farrag CLA 2006-05-24 11:52:15 EDT
(In reply to comment #20)

The com.ibm.icu version is 3.4.4.1 although I am using RC4 build of eclipse!!!
Comment 22 Karice McIntyre CLA 2006-05-24 13:52:54 EDT
Created attachment 42461 [details]
screen shot of problem on Linux

Sample diplays current date and time.  Problem is not exhibited on Windows.  Using ICU4J 3.4.4.1
Comment 23 Doug Felt (ICU4J) CLA 2006-05-24 14:57:37 EDT
This makes no sense to me.  The data for the decimal point symbol comes from the ICU4J resource files, which are platform-independent.  What is the actual sequence of chars (in hex) being output? (I don't currently have access to a machine to reproduce this problem.)
Comment 24 Paul Webster CLA 2009-03-09 09:18:24 EDT
Ahmed could you please attach simple source example (JFace) or simple plugin that we can check?

ICU will be up to version 4.0.1 in Eclipse 3.5

PW
Comment 25 Yoshito Umaoka CLA 2009-03-09 11:25:03 EDT
This is probably text rendering code or font problem on Linux platform.  ICU uses Arabic Decimal Separator (U+066B) while JDK uses ASCII Full stop (U+002E) for decimal separator in Arabic locales.  ICU does not use different symbol data by platform.  I think you should escalate this issue to team working on text rendering code (AWT?).
Comment 26 Eclipse Webmaster CLA 2019-09-06 16:06:19 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.