Closed Bug 1749151 Opened 4 years ago Closed 4 years ago

XCompose input is rejected with a unicode conversion error

Categories

(Core :: Widget: Gtk, defect)

Firefox 95
x86_64
Linux
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: timo.21.wilken+mozbugz, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

Environment: Arch Linux, Plasma (KDE) shell and i3 WM under Xorg.

I have set MOZ_USE_XINPUT=1, but without that environment variable, the behaviour is the same.

My system locale is en_GB.UTF-8 except for LC_{MONETARY,MEASUREMENT}=fr_FR.UTF-8, but I can also reproduce this bug when running Firefox with {LANG,LC_ALL}=en_US.UTF-8 or {LANG,LC_ALL}=C.

I have a user XCompose file at ~/.config/X11/XCompose, which includes /usr/share/X11/locale/en_US.UTF-8/Compose (see attached tarball).

To reproduce: in Firefox, focus the address bar or a text input field on a website. then try to use the Compose key to type an accented character, e.g. <Compose> " o to type an ö.

Actual results:

The resulting character (ö) does not appear in the address bar or in the focussed text input field. Firefox prints the following message to stdout:

** (firefox:133515): WARNING **: 20:11:55.216: Error converting text from IM to UTF-8: Invalid byte sequence in conversion input

Expected results:

Firefox should have accepted the ö character, and it should have appeared in the address bar or the text input field that had focus, like other text. No other programs on my computer have the same problem, independent of their graphics toolkit (GTK, Qt, Tcl/Tk).

The Bugbug bot thinks this bug should belong to the 'Firefox::Address Bar' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Address Bar
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

This bug is present for the address bar and other Firefox UI components, but also for HTML <input> elements, <textarea> elements and anything else that accepts text input, so I'm not sure Address Bar is the right component. I don't know where else it should go, though, apart from General.

Core product should be a better fit, tentatively setting the component. Please revert in case of error.

Component: Address Bar → Graphics: Text
Product: Firefox → Core

(Not a Graphics issue; this seems more like it belongs to Widget::Gtk.)

Are you running a Firefox build provided by Arch Linux, or one downloaded directly from Mozilla?

Component: Graphics: Text → Widget: Gtk
Flags: needinfo?(timo.21.wilken+mozbugz)

I'm running Arch's Firefox build. With the same version of Firefox (95.0.2) downloaded from Mozilla, the compose key works -- I guess it must be a problem on Arch's side then. I'll open a bug with them. Sorry for the spam!

Flags: needinfo?(timo.21.wilken+mozbugz)

Ah, interesting. Thank you for trying that. I suspect this is some kind of issue with the Arch package, then, or how it interacts with your wider software environment. (Searching for references to the "Error converting text from IM to UTF-8" message finds various reports and questions from people who have run into it, with a variety of software/systems, but it's not clear to me what the key factors may be here. I guess something about locale settings, encodings, etc isn't configured properly, but I'm not familiar with that whole setup.)

I'm closing this as Invalid, as it looks like it's not really a Firefox bug but a problem with the Arch distro's build; but feel free to follow up and we can re-open if it turns out there is something that should be fixed on the Mozilla side.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID

Hm, searching for the error message again turned up a hint I hadn't spotted before: I have GTK_IM_MODULE=xim set, which seems to cause the problem. Arch's Firefox works if I unset that env variable.

I had that set to get around compose key-related weirdness in GNOME (which I used to run), so getting rid of the variable works perfectly for me. Xim seems unsupported by lots of other software nowadays, so I wouldn't expect support for it in Firefox.

Thanks for the kind support!

You're welcome; thanks for reporting the issue you encountered, and for testing things to help identify the cause. Glad to know you've found a solution! (And having it recorded here may in turn help someone else who runs across the same problem.)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: