Skip to content

Commit

Permalink
Utf8 encoding of docstrings. See Embarcadero/DelphiVCL4Python#84
Browse files Browse the repository at this point in the history
  • Loading branch information
pyscripter committed Jun 23, 2024
1 parent ec485c1 commit ad3d8c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/WrapDelphi.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4290,7 +4290,7 @@ class procedure TPyDelphiObject.ExposeFields(AClass: TClass;
if Assigned(PyDocServer) and PyDocServer.Initialized and
PyDocServer.ReadMemberDocStr(LRttiField, LDocStr)
then
LExposedField.DocString := AnsiString(LDocStr);
LExposedField.DocString := Utf8Encode(LDocStr);

// Keep it alive until the Wrapper is Finalized
APyDelphiWrapper.fExposedMembers.Add(LExposedField);
Expand Down Expand Up @@ -4377,7 +4377,7 @@ class procedure TPyDelphiObject.ExposeProperties(AClass: TClass;
if Assigned(PyDocServer) and PyDocServer.Initialized and
PyDocServer.ReadMemberDocStr(LRttiProperty, LDocStr)
then
LExposedProperty.DocString := AnsiString(LDocStr);
LExposedProperty.DocString := Utf8Encode(LDocStr);

// Keep it alive until the Wrapper is Finalized
APyDelphiWrapper.fExposedMembers.Add(LExposedProperty);
Expand Down Expand Up @@ -4460,7 +4460,7 @@ class procedure TPyDelphiObject.ExposeIndexedProperties(AClass: TClass;
if Assigned(PyDocServer) and PyDocServer.Initialized and
PyDocServer.ReadMemberDocStr(LRttiProperty, LDocStr)
then
LExposedProperty.DocString := AnsiString(LDocStr);
LExposedProperty.DocString := Utf8Encode(LDocStr);

// Keep it alive until the Wrapper is Finalized
APyDelphiWrapper.fExposedMembers.Add(LExposedProperty);
Expand Down

0 comments on commit ad3d8c7

Please sign in to comment.