Merge pull request #7029 from symless/SYNERGY-928-Wrong-encoding-for-text-copied-between-linux-and-windows
SYNERGY-928 Wrong encoding for text copied between linux and windows
This commit is contained in:
commit
413a23d1f2
3 changed files with 12 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ Bug fixes:
|
||||||
- #7012 Fix natural horizontal scrolling on Mac client
|
- #7012 Fix natural horizontal scrolling on Mac client
|
||||||
- #6997 Allow Windows to go to sleep depending on system preferences
|
- #6997 Allow Windows to go to sleep depending on system preferences
|
||||||
- #7001 Add option to prevent computer from going to sleep
|
- #7001 Add option to prevent computer from going to sleep
|
||||||
|
- #7029 Wrong encoding for text copied between linux and windows
|
||||||
|
|
||||||
Enhancements:
|
Enhancements:
|
||||||
- #6998 Remove functionality related to the screen saver synchronisation
|
- #6998 Remove functionality related to the screen saver synchronisation
|
||||||
|
|
|
||||||
|
|
@ -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