Skip to content
Snippets Groups Projects
Commit 038c7503 authored by deuce's avatar deuce
Browse files

XA_STRING is explicitly ISO-8859-1

parent e1c3fbb0
No related branches found
No related tags found
No related merge requests found
......@@ -665,7 +665,7 @@ static int x11_event(XEvent *ev)
x11.XGetWindowProperty(dpy, win, ev->xselection.property, 0, bytes_left, True, AnyPropertyType, &pastebuf_format, &format, &len, &dummy, (unsigned char **)&pastebuf);
if (x11.utf8 && pastebuf_format == x11.utf8) {
char *opb = pastebuf;
pastebuf = (char *)utf8_to_cp(CIOLIB_CP437, (uint8_t *)pastebuf, '?', strlen(pastebuf), NULL);
pastebuf = (char *)utf8_to_cp(CIOLIB_ISO_8859_1, (uint8_t *)pastebuf, '?', strlen(pastebuf), NULL);
if (pastebuf == NULL)
pastebuf = opb;
else
......@@ -702,7 +702,7 @@ static int x11_event(XEvent *ev)
respond.xselection.property=None;
if(copybuf!=NULL) {
if(req->target==XA_STRING) {
char *cpstr = utf8_to_cp(CIOLIB_CP437, (uint8_t *)copybuf, '?', strlen(copybuf), NULL);
char *cpstr = utf8_to_cp(CIOLIB_ISO_8859_1, (uint8_t *)copybuf, '?', strlen(copybuf), NULL);
if (cpstr != NULL) {
x11.XChangeProperty(dpy, req->requestor, req->property, XA_STRING, 8, PropModeReplace, (uint8_t *)cpstr, strlen((char *)cpstr));
respond.xselection.property=req->property;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment