From b4c47959cc65867cea813d3853feddddf58f2421 Mon Sep 17 00:00:00 2001 From: Pete Date: Thu, 2 Nov 2023 10:33:09 -0700 Subject: Assume UTF-8 from the X11 clipboard. This stops a lot of error spew from libxwhichever: almost everything's UTF-8, Plan 9 won. --- emu/port/win-x11a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'emu/port/win-x11a.c') diff --git a/emu/port/win-x11a.c b/emu/port/win-x11a.c index bbc65761..0fc38450 100644 --- a/emu/port/win-x11a.c +++ b/emu/port/win-x11a.c @@ -969,7 +969,7 @@ xinitscreen(int xsize, int ysize, ulong reqchan, ulong *chan, int *d) } clipboard = XInternAtom(xmcon, "CLIPBOARD", False); - utf8string = XInternAtom(xmcon, "UTF8_STRING", False); + utf8string = XInternAtom(xmcon, "UTF8_STRING", True); targets = XInternAtom(xmcon, "TARGETS", False); text = XInternAtom(xmcon, "TEXT", False); compoundtext = XInternAtom(xmcon, "COMPOUND_TEXT", False); @@ -1523,7 +1523,7 @@ _xgetsnarf(XDisplay *xd) */ prop = 1; XChangeProperty(xd, xdrawable, prop, XA_STRING, 8, PropModeReplace, (uchar*)"", 0); - XConvertSelection(xd, clipboard, XA_STRING, prop, xdrawable, CurrentTime); + XConvertSelection(xd, clipboard, utf8string, prop, xdrawable, CurrentTime); XFlush(xd); lastlen = 0; for(i=0; i<10 || (lastlen!=0 && i<30); i++){ -- cgit v1.2.3