From 97dd49f0233804b04da5dbd076a1a18ab1f5b3d5 Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 25 Mar 2022 18:23:44 +0100 Subject: [PATCH] FIRE-31486; Make UTF8 the default clipboard format --- indra/llwindow/llwindowsdl.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index e0cd0bfb46..f3ba4cc6d4 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -325,10 +325,9 @@ void LLWindowSDL::initialiseX11Clipboard() XA_CLIPBOARD = XInternAtom(mSDL_Display, "CLIPBOARD", False); - gSupportedAtoms[0] = XA_STRING; - + gSupportedAtoms[0] = XInternAtom(mSDL_Display, "UTF8_STRING", False); gSupportedAtoms[1] = XInternAtom(mSDL_Display, "COMPOUND_TEXT", False); - gSupportedAtoms[2] = XInternAtom(mSDL_Display, "UTF8_STRING", False); + gSupportedAtoms[2] = XA_STRING; // TARGETS atom XA_TARGETS = XInternAtom(mSDL_Display, "TARGETS", False); @@ -359,7 +358,7 @@ bool LLWindowSDL::getSelectionText( Atom aSelection, Atom aType, LLWString &text &remaining, &data); if (data && len) { - text = LLWString( + text = LLWString( utf8str_to_wstring(reinterpret_cast< char const *>( data ) ) ); XFree(data);