Community
Participate
Working Groups
Created attachment 230381 [details] sample txt file which includes Unicode surrogate characters A movement of cursor behaves wrongly around Unicode surrogate characters. OS: RHEL 6 Japanese Orion: https://orion.eclipse.org (as of 2nd May 2013, I20130430-1910) Web browser: Firefox ESR 17 ESR and 20 Steps to recreate problem: 1- create a file on Orion navigator 2- Input Unicode surrogate characters in the file (Please copy & paste characters in attached text file to input. They are saved in UTF-8 format) 3- move cursor to the first character in the 4th line 4- press right arrow key to move cursor to right 5- verify the cursor moves to next one character by pushing right arrow key once 6- after the cursor moved to the 5th line by continuing to push right arrow key, select one of characters in the 5th line by clicking left mouse button 7- verify the cursor moves to the place of character in the 5th line which you selected at step 6 Expected: at step 5, each time you push right arrow key, the cursor moves to the next character. at step 7, the cursor moves to the place you clicked in the 5th line. Actual: at step 5, some of characters (Unicode surrogate characters) in the 4th line need to push right arrow key twice to move the cursor to the next character. at step 7, the cursor moves to the next line (6th line) instead of moving to the character where you selected in the 5th line. Additional information: 1. About the problem about the step 5, this happens in every web browsers on all platforms while the problem about the step 7 happens only on Firefox on RHEL. 2. Probably related to the problem of the step 5, selecting characters by mouse and then copy & paste does not work properly about these Unicode surrogate characters. A part of pasted characters are garbled. It seems first byte of Unicode surrogate character is not selected by mouse selection though the character itself is highlighted.
Created attachment 230382 [details] screenshot about the problem about the step 5
Created attachment 230383 [details] screenshot about the problem at the step 7
Created attachment 230384 [details] screenshot of garbled characters by pasting This is the issue I described in the "Additional information".
This patch fixes the problem in step 5 and the copy/paste problem. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=ad775a4431d1c034d664804fabd1f3144cbaee62 The problem in step 7 happens because the calculate line height does not match the actually drawing. The lines with DBCS charecters are taller. Note the ruler lines to not match to text lines. Currently, the editor supports only fixed line height. I am closing this bug since the remaining problem is addressed in other bugs (bug#334910, bug#386517, bug#406782).
Thank you for the fix, I have verified on Firefox on RHEL6 about step 5 and copy&paste.