SYNERGY-928 Wrong encoding for text copied between linux and windows
This commit is contained in:
parent
775c85a9e7
commit
dc8694ff20
2 changed files with 11 additions and 2 deletions
|
|
@ -79,6 +79,8 @@ XWindowsClipboard::XWindowsClipboard(Display* display,
|
||||||
// add converters, most desired first
|
// add converters, most desired first
|
||||||
m_converters.push_back(new XWindowsClipboardHTMLConverter(m_display,
|
m_converters.push_back(new XWindowsClipboardHTMLConverter(m_display,
|
||||||
"text/html"));
|
"text/html"));
|
||||||
|
m_converters.push_back(new XWindowsClipboardHTMLConverter(m_display,
|
||||||
|
"application/x-moz-nativehtml"));
|
||||||
m_converters.push_back(new XWindowsClipboardBMPConverter(m_display));
|
m_converters.push_back(new XWindowsClipboardBMPConverter(m_display));
|
||||||
m_converters.push_back(new XWindowsClipboardUTF8Converter(m_display,
|
m_converters.push_back(new XWindowsClipboardUTF8Converter(m_display,
|
||||||
"text/plain;charset=UTF-8"));
|
"text/plain;charset=UTF-8"));
|
||||||
|
|
|
||||||
|
|
@ -57,11 +57,18 @@ XWindowsClipboardHTMLConverter::getDataSize() const
|
||||||
String
|
String
|
||||||
XWindowsClipboardHTMLConverter::fromIClipboard(const String& data) const
|
XWindowsClipboardHTMLConverter::fromIClipboard(const String& data) const
|
||||||
{
|
{
|
||||||
return Unicode::UTF8ToUTF16(data);
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
String
|
String
|
||||||
XWindowsClipboardHTMLConverter::toIClipboard(const String& data) const
|
XWindowsClipboardHTMLConverter::toIClipboard(const String& data) const
|
||||||
{
|
{
|
||||||
return Unicode::UTF16ToUTF8(data);
|
if (Unicode::isUTF8(data))
|
||||||
|
{
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Unicode::UTF16ToUTF8(data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue