mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 10:59:20 +02:00
LCL-Win32: Convert clipboard CF_TEXT between WinCP and UTF-8. Issue #34073.
git-svn-id: trunk@58805 -
This commit is contained in:
parent
066994a334
commit
26454daa11
@ -453,7 +453,7 @@ begin
|
||||
Size := Pos(#0, BufferString);
|
||||
if Size > 0 then
|
||||
SetLength(BufferString, Size - 1);
|
||||
BufferString := AnsiToUtf8(BufferString);
|
||||
BufferString := WinCPToUTF8(BufferString);
|
||||
end;
|
||||
Stream.Write(BufferString[1], Length(BufferString));
|
||||
end;
|
||||
@ -615,7 +615,7 @@ function TWin32WidgetSet.ClipboardGetOwnerShip(ClipboardType: TClipboardType;
|
||||
end
|
||||
else
|
||||
begin
|
||||
BufferString := Utf8ToAnsi(BufferString);
|
||||
BufferString := UTF8ToWinCP(BufferString);
|
||||
if BufferString<>'' then // original string may contain invalid UTF8
|
||||
BufferStream.Write(BufferString[1], Length(BufferString));
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user