Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[win] Generic TextEditor: Some unicode characters cause text to be rendered incorrectly #1225

Open
nlisker opened this issue May 13, 2024 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@nlisker
Copy link

nlisker commented May 13, 2024

Describe the bug
Redirected from Eclipse JDT: eclipse-jdt/eclipse.jdt.ui#1403

Adding some unicode characters to a text editor can cause either a change in the font of the line in which the character is added, or the character to not be displayed correctly.

To Reproduce
Open any text file in a text editor. My demonstration is with a .java file, but in the link above a .txt file is also used. Type text into that file, for example: image (" abc ").

Copy the character (\u2B73).

  1. Paste it at the start of the string, the character is shown correctly, but the string changes its font: image
  2. Paste it at the end of the string, the character is shown incorrectly, but the string does not change font: image
  3. Copy a non-problematic character, like (\u2190).
    a. Paste it between and abc, the characters are shown correctly and the font does not change: image, image
    b. Paste it at the edge, and the problem resurfaces: image

The same issue occurs with the character (\u2BA0).

Expected behavior
The characters will show correctly and the string will not change its font regardless of the positions those characters appear at.

Environment:

  1. Select the platform(s) on which the behavior is seen:
    Only tested on Windows.
    • All OS
    • Windows
    • Linux
    • macOS
  1. Additional OS info (e.g. OS version, Linux Desktop, etc)
    Windows 10

  2. JRE/JDK version
    21 and 22

Version since
Eclipse 2024-03, haven't tested older versions.
Text file encoding doesn't seem to matter. Tested UTF-8, UTF-16, UTF-16BE, UTF-16LE and ISO-8859-1.

@fedejeanne
Copy link
Contributor

@nlisker thank you for reporting this issue!

Is this something you would like to work on or were you just reporting it? :-)

@nlisker
Copy link
Author

nlisker commented May 13, 2024

Just reporting. I don't know SWT and the Eclipse inner workings well enough to be able to work on this in a meaningful amount of time.

@fedejeanne fedejeanne added help wanted Extra attention is needed good first issue Good for newcomers labels May 13, 2024
@jukzi jukzi changed the title Some unicode characters in a String cause it to be rendered incorrectly [win] Generic TextEditor: Some unicode characters cause text to be rendered incorrectly May 13, 2024
@jukzi jukzi added the bug Something isn't working label May 13, 2024
@jukzi
Copy link
Contributor

jukzi commented May 13, 2024

not reproducible with a plain org.eclipse.swt.custom.StyledText

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants