Browse Source

* fix for Mantis #38023: the code to convert LF to CRLF when converting to UTF-8 is disabled anyway, so disable unnecessary, duplicate if-branches as well

git-svn-id: trunk@47284 -
svenbarth 4 years ago
parent
commit
c2454d5386
1 changed files with 4 additions and 4 deletions
  1. 4 4
      rtl/inc/ustrings.inc

+ 4 - 4
rtl/inc/ustrings.inc

@@ -1833,9 +1833,9 @@ end;
             if (IBYTE and $80) = 0 then
             if (IBYTE and $80) = 0 then
               begin
               begin
                 //One character US-ASCII, convert it to unicode
                 //One character US-ASCII, convert it to unicode
+(*
                 if IBYTE = 10 then
                 if IBYTE = 10 then
                   begin
                   begin
-(*
                     If (PreChar<>13) and FALSE then
                     If (PreChar<>13) and FALSE then
                       begin
                       begin
                         //Expand to crlf, conform UTF-8.
                         //Expand to crlf, conform UTF-8.
@@ -1856,7 +1856,6 @@ end;
                           end;
                           end;
                       end
                       end
                     else
                     else
-*)
                       begin
                       begin
                         Dest[OutputUnicode]:=WideChar(IBYTE);
                         Dest[OutputUnicode]:=WideChar(IBYTE);
                         inc(OutputUnicode);
                         inc(OutputUnicode);
@@ -1864,6 +1863,7 @@ end;
                       end;
                       end;
                   end
                   end
                 else
                 else
+*)
                   begin
                   begin
                     Dest[OutputUnicode]:=WideChar(IBYTE);
                     Dest[OutputUnicode]:=WideChar(IBYTE);
                     inc(OutputUnicode);
                     inc(OutputUnicode);
@@ -1978,9 +1978,9 @@ end;
             if (IBYTE and $80) = 0 then
             if (IBYTE and $80) = 0 then
               begin
               begin
                 //One character US-ASCII, convert it to unicode
                 //One character US-ASCII, convert it to unicode
+(*
                 if IBYTE = 10 then
                 if IBYTE = 10 then
                   begin
                   begin
-(*
                     if (PreChar<>13) and FALSE then
                     if (PreChar<>13) and FALSE then
                       begin
                       begin
                         //Expand to crlf, conform UTF-8.
                         //Expand to crlf, conform UTF-8.
@@ -1990,13 +1990,13 @@ end;
                         PreChar:=10;
                         PreChar:=10;
                       end
                       end
                     else
                     else
-*)
                       begin
                       begin
                         inc(OutputUnicode);
                         inc(OutputUnicode);
                         PreChar:=IBYTE;
                         PreChar:=IBYTE;
                       end;
                       end;
                   end
                   end
                 else
                 else
+*)
                   begin
                   begin
                     inc(OutputUnicode);
                     inc(OutputUnicode);
                     PreChar:=IBYTE;
                     PreChar:=IBYTE;