Bug 564064

Summary: TreeViewer Cannot Handle Unknown Non-UTF8 Symbols Correctly
Product: [Eclipse Project] Platform Reporter: Duc Nguyen <duc.matma1990>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: kalyan_prasad
Version: 4.16   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
Selection and scrollbar broken for non UTF-8 unicodes none

Description Duc Nguyen CLA 2020-06-08 04:50:20 EDT
There is a problem with resolving non UTF8 symbols like "���RR" in JFace tree. The symbols are displayed but cannot be selected. In addition it is not possible to use the horizontal scroll bar to scroll to the end of the tree node text. 

When debugging you can see the value with the unknown symbols, but if you click on the value the symbols disappear.

Does anyone know a workaround or how to fix this?
Comment 1 Kalyan Prasad Tatavarthi CLA 2020-06-12 04:21:53 EDT
(In reply to Duc Nguyen from comment #0)
> There is a problem with resolving non UTF8 symbols like "���RR" in JFace
> tree. The symbols are displayed but cannot be selected. In addition it is
> not possible to use the horizontal scroll bar to scroll to the end of the
> tree node text. 
> 
> When debugging you can see the value with the unknown symbols, but if you
> click on the value the symbols disappear.
> 
> Does anyone know a workaround or how to fix this?

Can you please provide a sample project/code-snippet which highlights the above problem ?
Comment 2 Duc Nguyen CLA 2020-06-17 06:57:38 EDT
Created attachment 283319 [details]
Selection and scrollbar broken for non UTF-8 unicodes
Comment 3 Duc Nguyen CLA 2020-06-17 06:58:57 EDT
You can just create a TreeViewer and register a Labelprovider where you hardcode to return "���RR" for the getText method. Then you should be able to reproduce.

Thank you in advance!