View Issue Details

IDProjectCategoryView StatusLast Update
0035696LazarusLazUtilspublic2019-06-10 18:19
ReporterSerge AnvarovAssigned ToMattias Gaertner 
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Product Version2.1 (SVN)Product Build 
Target VersionFixed in Version 
Summary0035696: LazUTF8.SysToUTF8(TFormatSettings) micropatch
DescriptionAll three functions "UTF8ToSys(string)", "UTF8ToSys(TFormatSettings)", "SysToUtf8(string)" do nothing when UTF8_RTL is defined. But the "SysToUtf8(TFormatSettings)" function contains code that essentially does nothing. I think just this function was missed.
TagsNo tags attached.
Fixed in Revision61352
LazTarget-
Widgetset
Attached Files
  • LazUTF8.SysToUTF8.diff (889 bytes)
    Index: components/lazutils/lazutf8.pas
    ===================================================================
    --- components/lazutils/lazutf8.pas	(revision 61339)
    +++ components/lazutils/lazutf8.pas	(working copy)
    @@ -322,10 +322,13 @@
     end;
     
     function SysToUTF8(const AFormatSettings: TFormatSettings): TFormatSettings;
    +{$IFNDEF UTF8_RTL}
     var
       i: Integer;
    +{$ENDIF}
     begin
       Result := AFormatSettings;
    +  {$IFNDEF UTF8_RTL}
       Result.CurrencyString := SysToUTF8(AFormatSettings.CurrencyString);
       for i:=1 to 12 do begin
         Result.LongMonthNames[i] := SysToUTF8(AFormatSettings.LongMonthNames[i]);
    @@ -335,6 +338,7 @@
         Result.LongDayNames[i] := SysToUTF8(AFormatSettings.LongDayNames[i]);
         Result.ShortDayNames[i] := SysToUTF8(AFormatSettings.ShortDayNames[i]);
       end;
    +  {$ENDIF}
     end;
     
     function UTF8ToSys(const AFormatSettings: TFormatSettings): TFormatSettings;
    

Activities

Serge Anvarov

2019-06-09 12:51

reporter  

LazUTF8.SysToUTF8.diff (889 bytes)
Index: components/lazutils/lazutf8.pas
===================================================================
--- components/lazutils/lazutf8.pas	(revision 61339)
+++ components/lazutils/lazutf8.pas	(working copy)
@@ -322,10 +322,13 @@
 end;
 
 function SysToUTF8(const AFormatSettings: TFormatSettings): TFormatSettings;
+{$IFNDEF UTF8_RTL}
 var
   i: Integer;
+{$ENDIF}
 begin
   Result := AFormatSettings;
+  {$IFNDEF UTF8_RTL}
   Result.CurrencyString := SysToUTF8(AFormatSettings.CurrencyString);
   for i:=1 to 12 do begin
     Result.LongMonthNames[i] := SysToUTF8(AFormatSettings.LongMonthNames[i]);
@@ -335,6 +338,7 @@
     Result.LongDayNames[i] := SysToUTF8(AFormatSettings.LongDayNames[i]);
     Result.ShortDayNames[i] := SysToUTF8(AFormatSettings.ShortDayNames[i]);
   end;
+  {$ENDIF}
 end;
 
 function UTF8ToSys(const AFormatSettings: TFormatSettings): TFormatSettings;

Mattias Gaertner

2019-06-10 18:19

manager   ~0116661

Thanks!

Issue History

Date Modified Username Field Change
2019-06-09 12:51 Serge Anvarov New Issue
2019-06-09 12:51 Serge Anvarov File Added: LazUTF8.SysToUTF8.diff
2019-06-10 18:19 Mattias Gaertner Assigned To => Mattias Gaertner
2019-06-10 18:19 Mattias Gaertner Status new => resolved
2019-06-10 18:19 Mattias Gaertner Resolution open => fixed
2019-06-10 18:19 Mattias Gaertner Fixed in Revision => 61352
2019-06-10 18:19 Mattias Gaertner LazTarget => -
2019-06-10 18:19 Mattias Gaertner Note Added: 0116661