| Summary: | [DBCS4.2] The backslash followed by DBCS character is not same as one followed by sbcs | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Harendra <harendra> | ||||||
| Component: | SWT | Assignee: | Silenio Quarti <Silenio_Quarti> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | camle, daniel_megert, gheorghe, kennoji, pwebster, Silenio_Quarti | ||||||
| Version: | 3.8 | Flags: | gheorghe:
review+
|
||||||
| Target Milestone: | 3.8 RC1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Harendra
Created attachment 214439 [details]
Correctbackslash37.png correct example.
Created attachment 214440 [details]
incorrectbackslash42.png in eclipse 4.2
Did you change some preferences? Out of the box we don't escape when pasting. I can't reproduce it on my Windows machine. Also, are you saying that it works with 3.7 but not with 3.8 using the same JRE? Sorry for the slightly misleading screenshot I did not mean to emphasize the escaped character. What I wanted to emphasize was that backslash appears in two different forms (backslash and yen mark) in the same line. Yes it works perfectly with 3.7. In Japanese environment backslash and yen mark are used interchangeably as they share same code point. During display the font determines which form is to be displayed. In this case what is happening is that somehow different font is applied once dbcs characters appear. So one font renders backslash as backslash and a different font renders same character as yen mark all in same line! Has the editor changed to accommodate multiple fonts currently? The bottom line is that even though the yen mark and backslash share share the same code point they are different characters and have different meanings when used semantically. So this needs to be fixed. In order to reproduce this bug you need first set your os locale to Japanese and use MS943 in eclipse as default locale. You also need to install Japanese language packs. This might be a bit time consuming in windows, I will see if this is reproducible in Linux as well. It should be fairly simple to reproduce in linux. (In reply to comment #4) > Sorry for the slightly misleading screenshot I did not mean to emphasize the > escaped character. What I wanted to emphasize was that backslash appears in two > different forms (backslash and yen mark) in the same line. Thanks for the clarification. I can now easily see the problem on plain English Windows 7 when I paste the following into a plain text editor or into the StyledText CustomControlExample using Consolas Regular 10: c:\\ぷろぐらむ\\program This got broken during M3 by 359101 the fix for bug . (In reply to comment #5) > This got broken during M3 by 359101 the fix for bug . This got broken during M3 by the fix for bug 359101. We looked into this and found the cause of this is Bug 352927 - Bug 359101 just changes some rectangle drawing and is unrelated. (http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=82a54cc43807fc82d1a81b73000c952bbf4bb0b8) (In reply to comment #7) > We looked into this and found the cause of this is Bug 352927 - Bug 359101 just > changes some rectangle drawing and is unrelated. > > (http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=82a54cc43807fc82d1a81b73000c952bbf4bb0b8) Ah, I picked the wrong change to TextLayout. Sorry. The only way to fix this problem is by removing the optimization done in bug#352927. |