View Issue Details

IDProjectCategoryView StatusLast Update
0004591JEDI VCL00 JVCL Componentspublic2008-11-30 13:46
ReporterrdullierAssigned ToAHUser 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.35 
Target VersionFixed in Version3.36 
Summary0004591: TJvLogFile is affected by bug 0004540, Unicode bug for AnsiString(0000013#10)
DescriptionSee Mantis 0004540: Can't use sLineBreak in D2009 for JvEditor.pas GetSelText

Should patch code to use sLineBreakStr here :
function TJvLogRecord.GetOutputString: string;
begin
  Result := '[' + Time + ']' + StringReplace(Title, '>', '>>', [rfReplaceAll]) +
            '>' + Description + sLineBreak;
end;

Anyway after doing so, the generated log is still buggy.
In hex view, we can see some shift in the bytes, making unicode chars unreadable. This might be occuring because of a string/ansistring mix somewhere.
Additional Information1) I've inherited the class, see attachments for sample log and new class
2) Getting late today, will be able to further help tomorrow
TagsNo tags attached.

Activities

2008-11-17 15:17

 

RadarBrowser.log (526 bytes)

2008-11-17 15:18

 

TILogWrappers.pas (2,738 bytes)

rdullier

2008-11-30 12:07

reporter   ~0015069

Sadly, i tried to remove unicode support for log file doing this :
procedure TJvLogFile.SaveToStream(Stream: TStream);
var
  I: Integer;
  St: string;
begin
  with TStringList.Create do
  try
    for I := 0 to FList.Count - 1 do
      with FList[I] do
      begin
        St := GetOutputString;
        Stream.WriteBuffer(Pointer(AnsiString(St))^, Length(AnsiString(St)));
      end;
  finally
    Free;
  end;
end;


The resulting log file is not screwed.
Please note that w/o this fix, the log file is actually NOT usable, thus breaking the component.

AHUser

2008-11-30 13:46

developer   ~0015070

Fixed in SVN.

Issue History

Date Modified Username Field Change
2008-11-17 15:17 rdullier New Issue
2008-11-17 15:17 rdullier File Added: RadarBrowser.log
2008-11-17 15:18 rdullier File Added: TILogWrappers.pas
2008-11-18 08:23 obones Status new => acknowledged
2008-11-30 12:07 rdullier Note Added: 0015069
2008-11-30 13:46 AHUser Note Added: 0015070
2008-11-30 13:46 AHUser Status acknowledged => resolved
2008-11-30 13:46 AHUser Fixed in Version => Daily / SVN
2008-11-30 13:46 AHUser Resolution open => fixed
2008-11-30 13:46 AHUser Assigned To => AHUser