Skip to content

Commit

Permalink
Convert selected text to UTF-8 before encoding
Browse files Browse the repository at this point in the history
Fixes #1
  • Loading branch information
Robert Di Pardo authored and Robert Di Pardo committed Mar 30, 2022
1 parent 4a496ff commit d2189a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LibNppPlugin/NppSimpleObjects.pas
Expand Up @@ -565,7 +565,7 @@ function TSelection.GetText: WideString;
begin
Chars := AnsiString(StringOfChar(#0, Self.GetLength + 1));
FEditor.SendMessage(SCI_GETSELTEXT, 0, PAnsiChar(Chars));
Result := WideString(Chars);
Result := WideString(UTF8Decode(Chars));
// DebugWrite('TSelection.GetText', Result);
end;
{ ------------------------------------------------------------------------------------------------ }
Expand Down

0 comments on commit d2189a1

Please sign in to comment.