Skip to content

keep some more /usr/share/X11/locale files

Pace Willisson requested to merge pacew/archlinux-docker:x11-locale into master

The aggressive pruning of locales causes X11 input methods to fail in unexpected ways. For example, the library https://github.com/lv2/pugl calls XOpenIM in libx11 which returns NULL if any of the files C, compose.dir, or iso8859-1 are missing from /usr/share/X11/locale. This ultimately leads to a SIGSEGV when this NULL finds its way to a call to XUnsetICFocus. Perhaps pugl should be more careful (I've submitted a PR https://github.com/lv2/pugl/pull/83 ), but adding these files to the archlinux image could help other programs.

In this example program, XOpenIM returns NULL in the current archlinux images, but returns a reasonable pointer with this patched image.

/* cc xtest.c -lX11 */
#include <stdio.h>
#include <X11/X.h>
#include <X11/Xlib.h>

int
main()
{
  Display *display = XOpenDisplay(NULL);
  XIM xim = XOpenIM(display, NULL, NULL, NULL);
  printf ("xim %p\n", xim);
  return (0);
}

Merge request reports