pyglet: xlib issue: Could not create UTF8 text property
There is a well known issue possibly occurring on some systems but not others, where the xlib integration code may bail out, coming from this line of code. The workaround suggested is changing the system-wide locale or setting the environment LANG variable to en_US, however it would be nice if other locales worked too, such that this environment tweak is not necessary. If xlib is friendly enough to allow and I understand the issue correctly.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (13 by maintainers)
Commits related to this issue
- xlib: Attempt to better detect UTF8 capability - #520 — committed to pyglet/pyglet by benmoran56 3 years ago
Great! Thanks again for your help on this.
I suppose we can close this now, as the fix will be in the next point release.
@matanster If you or your coworkers need to set pyglet-based tools up on their systems, you might no longer need the locale tweaks in future releases.
If you’re using an RTL language things might still break in but in different ways.
Yes, I meant changing the LANG variable outside Python. I ran
LANG=en_US python test.pywhich worked.This throws the same error
pyglet.window.xlib.XlibException: Could not create UTF8 text propertyAlso, I just wanted to confirm, you mean
en_IN.UTF8/en_IN.utf8right?I am facing the same issue. Changing LANG to en_US fixes it
I tested this on a new venv with only pyglet installed, simply ran