Non-English characters are not displayed in Text until English character is typed

Bug #2047445 reported by grofaty
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Fix Committed
Medium
Unassigned

Bug Description

a) I have downloaded the latest Pinta 2.2-dev from master repository https://github.com/PintaProject/Pinta/actions/runs/7326780534/artifacts/1134741800 and installed on Ubuntu 23.10
b) On Ubuntu I have set Language settings to Slovenian and logged-off/logged-in.

1. Text from tools and click on canvas.
2. I have selected "Arial Regular" font that I use most of the time.
3. Click on canvas and start typing. If I type in non-English characters like my native: čšž characters they do not appear in the input box. THE PROBLEM. I expect to be displayed. But as soon as I type English character e.g. letter a, then whole typed in string including non-English letters appear.

Interesting. I have tested with Pinta 2.1.1 flatpak edition and the same problem appears. Strange... I mostly write English text, so I may even not spotted this problem in previous version.

Revision history for this message
grofaty (grofaty) wrote :

I have changed Ubuntu's system-wide language to English and the same problem (both in Pinta 2.1.1 and Pinta 2.2-dev).

Revision history for this message
grofaty (grofaty) wrote :

I did a quick test with Pinta 2.2-dev (like a week old version) on Windows 10 and non-English characters are correctly typed exactly at the time when there are pressed.

Looks like Linux specific problem.

Revision history for this message
Cameron White (cameronwhite91) wrote :

Do any other linux apps behave this way? It could be something to do with the input method handling, especially if it's Linux-only since Pinta is just using the standard GTK facilities for this

Revision history for this message
grofaty (grofaty) wrote :

ADDITIONAL TESTS:
1. I have tested in Gimp, Text Editor and some other tools. Pinta is the only application with this issue.
2. Copy "Č" letter and paste it to Pinta and it pastes correctly. So typing in a character is a problem.
3. I see the same problem with German letters: ä, ü, ë. Type in one of this character and nothing appears on screen, then type some English letter and then non-English and English letter both appear at the same time.

All this non-English characters have in common is there are two-bytes characters in UTF-8 code page and single byte character in on ASCII code pages. Don't know if this is an issue, just trying to figure out what they all have in common. Is there some setting related to this?

Revision history for this message
Cameron White (cameronwhite91) wrote :

Can you give https://github.com/PintaProject/Pinta/commit/ee4087440308e74ba529682909dd713af6ecf770 a test? As an English keyboard user (and on macOS currently) I'm not super familiar with how to test this properly, but I suspect the issue might be that the GTK input method expects us to display the "pre-edited" string before it is committed. This change hopefully gets the system to display it somehow instead..

Revision history for this message
grofaty (grofaty) wrote :

I would really like to test this, because this is annoying issue.

But for some reason I cannot download latest Pinta 2.2-dev from master. Maybe there is something wrong with the build. See attachment for details.

Revision history for this message
grofaty (grofaty) wrote :

I see new build is available (probably new commit in source code). I have downloaded: https://github.com/PintaProject/Pinta/actions/runs/7341090720/artifacts/1136849802 currently latest Pinta 2.2-dev from master.

I retested the problem, but the problem is the same. So new commit did not fix a problem.

If it is helpful maybe add some additional logging into the shell output or something that we see if Pinta hits the source code you expect... or temporally add some message box or something...

Revision history for this message
Cameron White (cameronwhite91) wrote :

Hmm, I'm not sure what happened there. The very latest one (https://github.com/PintaProject/Pinta/actions/runs/7341090720) did work for me, so perhaps try that?

Revision history for this message
grofaty (grofaty) wrote :

I have searched the web, you can type in non-English characters on English keyboard with small trick.

According to articles:
https://help.ubuntu.com/stable/ubuntu-help/tips-specialchars.html.en
and https://www.utf8-chartable.de/

for example to type in German letter: Ä type do:
a) Press and hold CTRL+Shift and now press the U key.
b) type in: 00C4 and Spacebar and character should appear (it does in Text Editor, but it does not in Pinta)
c) If you now press any English character e.g. letter a, then both: Äa appears

Revision history for this message
Cameron White (cameronwhite91) wrote :

Thanks, confirmed on an Ubuntu VM
I've reverted the previous change that didn't do anything - I think we probably need to implement support for pre-editing which displays a preview of the key sequence (https://docs.gtk.org/gtk4/signal.IMContext.preedit-changed.html), which requires a bit more work

Changed in pinta:
importance: Undecided → Medium
milestone: none → 2.3
status: New → Triaged
Revision history for this message
Cameron White (cameronwhite91) wrote :
Changed in pinta:
milestone: 2.3 → 2.2
status: Triaged → Fix Committed
Revision history for this message
grofaty (grofaty) wrote :

I have downloaded the latest Pinta-2.2-dev master https://github.com/PintaProject/Pinta/actions/runs/7354005687/artifacts/1138858721

I have retested and now I can't type in any character at all. Expect non-English characters that are typed in after another English character is pressed. But in this case only non-English character is displayed.

Revision history for this message
Cameron White (cameronwhite91) wrote :

Should be fixed now by https://github.com/PintaProject/Pinta/commit/fae1f3e0e332a03d75c0ea4ee8dfbce8f47d9d1b

I made a change right before committing and didn't test it properly :/

Revision history for this message
grofaty (grofaty) wrote :

I have downloaded the latest Pinta-2.2-dev master https://github.com/PintaProject/Pinta/actions/runs/7358167361/artifacts/1139482905

Now it works as before, while I have reported issue in this bug report.

But whole issue in this bug report is still valid.

Changed in pinta:
status: Fix Committed → Confirmed
Revision history for this message
grofaty (grofaty) wrote :

I have also tested #9, but strangely after all of the steps now is it displayed "ua" (without double quote), in #9 it returned "üa", so latest fix has also little bit worsen the situation.

In my keyboard I can't type in directly the "ü" German characters, but I can do it with three key combination. Right-Alt + ¨ + u and in Text Editor (and in Pinta version at #9) displayed "ü", but now after pressing additionally letter a it is displayed "¨a".

Revision history for this message
Cameron White (cameronwhite91) wrote :

This should be working now with the latest commits which have a few fixes for Ubuntu. There seem to be a lot of different behaviours across platforms for this :/

Revision history for this message
grofaty (grofaty) wrote :

I have downloaded Pinta 2.2-dev on Ubuntu 23.10 latest master: https://github.com/PintaProject/Pinta/actions/runs/7360966159/artifacts/1139902949

Findings:
1. My issue reported in this bug report, still does not work. It is still required to press some English letter (or spacebar) in order characters: č, š, ž appear. PROBLEM.
2. I can type in: Rigth-Alt + ¨ + u to get ü which is OK.
3. I can type in: Ctrl + Shift + U and type in 00c4 and it appears Ä which is OK.

Revision history for this message
Cameron White (cameronwhite91) wrote :

For problem 1, I think I assumed you were using Ctrl + Shift + U to type in those characters. Are you entering them directly from a keyboard which has keys for those characters?

Revision history for this message
grofaty (grofaty) wrote :

On my keyboard I enter those characters directly, one simple key for one character. See attachment.

I only wrote Ctrl + Shift + U as work-around solution, because you wrote you only have English keyboard.

Revision history for this message
Cameron White (cameronwhite91) wrote :

Thanks! I could reproduce by switching my keyboard layout in the system settings

https://github.com/PintaProject/Pinta/commit/80650c83e1a292b4824f96c1e7b4b607c12dbaa1 should fix this

Changed in pinta:
status: Confirmed → Fix Committed
Revision history for this message
grofaty (grofaty) wrote :

Excellent, it works now on Pinta 2.2-dev latest master on https://github.com/PintaProject/Pinta/actions/runs/7368380488/artifacts/1140775323 Ubuntu 23.10.

Thanks a lot for fixing this.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.