
 - XftColorAllocName() is failing on "#rrggbb", use XParseColor()
 - Xutf8TextListToTextProperty() needs locale to be set.

--- a/x.c	2020-06-19 11:29:45.000000000 +0200
+++ b/x.c	2020-06-26 01:07:13.000000000 +0200
@@ -754,6 +754,7 @@
 xloadcolor(int i, const char *name, Color *ncolor)
 {
 	XRenderColor color = { .alpha = 0xffff };
+	XColor xcol;
 
 	if (!name) {
 		if (BETWEEN(i, 16, 255)) { /* 256 color */
@@ -771,6 +772,14 @@
 			name = colorname[i];
 	}
 
+	if (XParseColor(xw.dpy, xw.cmap, name, &xcol)) {
+		color.green = xcol.green;
+		color.blue = xcol.blue;
+		color.red = xcol.red;
+		return XftColorAllocValue(xw.dpy, xw.vis,
+						xw.cmap, &color, ncolor);
+	}
+
 	return XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor);
 }
 
