-
Notifications
You must be signed in to change notification settings - Fork 903
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
Eventloop initialization failure - Failed to open input method #636
Comments
Same here. changing from
|
Same thing here; encountered within alacritty as above. My default LANG is The alacritty issue ref'd above has other people changing locales and getting it working, too. Is there any way to work around this without changing LANG? |
I'd love to investigate this, but I cannot reproduce it. Tried adding |
Run Btw you can just export it and it should also do the trick. |
Even if you're having trouble reproducing it there, I'll gladly proffer my system for test builds and theories as needed. (To follow up what elichai said, I just did the cross-LANG test with |
https://i.imgur.com/i61KD4I.png :/ It would be useful to know the values of The values of So would printing out EDIT: |
Using version
Successful run (using
|
Can you test against winit master? |
Same with
Successful run (using
|
This restores default portable 'C' locale when target locale is unsupported by X11 backend (Xlib). When target locale is unsupported by X11, some locale-dependent Xlib functions like `XSetLocaleModifiers` fail or have no effect triggering later failures and panics. When target locale is not valid, `setLocale` should normally leave the locale unchanged (`setLocale` returns 'C'). However, in some situations, locale is accepted by `setLocale` (`setLocale` returns the new locale) but the accepted locale is unsupported by Xlib (`XSupportsLocale` returns `false`). Fix rust-windowing#636
As far as I understand, it seems the initialization is failing (at least on my system) because my current locale ( winit/src/platform_impl/linux/x11/mod.rs Line 108 in 96df858
but is refused by X11 ( XSetLocaleModifiers returns NULL) :
If I set my locale with I have made a PR (#1445) which does not fix the root problem ( |
This restores default portable 'C' locale when target locale is unsupported by X11 backend (Xlib). When target locale is unsupported by X11, some locale-dependent Xlib functions like `XSetLocaleModifiers` fail or have no effect triggering later failures and panics. When target locale is not valid, `setLocale` should normally leave the locale unchanged (`setLocale` returns 'C'). However, in some situations, locale is accepted by `setLocale` (`setLocale` returns the new locale) but the accepted locale is unsupported by Xlib (`XSupportsLocale` returns `false`). Fix #636
Arrived here via alacritty: alacritty/alacritty#5153 Setting LANG doesn't appear to work for me. EDIT: I fixed this by reverting some custom pacman config (Arch). See above issue for more details. |
Got this on Debian Buster.
Managed to fix it by commenting line 81 (setlocale) in the file mentioned in the log.
Edit: It seems that setting the LC_CTYPE locale to an empty c string is invalid, using b"C\0" worked.
Using LC_ALL doesn't work either with an empty string, at least on my system.
Update: It seems that the problem has something to do with my etc/default/locale being set to en_IL.UTF-8. I changed it to en_US.UTF-8 and it worked.
The text was updated successfully, but these errors were encountered: