miteruel / simdesign

Automatically exported from code.google.com/p/simdesign
2 stars 1 forks source link

Possible bug in sdWideToUTF8Buffer #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
EOL normalization in sdWideToUTF8Buffer does not work as expected

if, for example, attribute value contains escaped CRLF ($0D$0A) after call to 
this function it results in $0A$0A, so escaped multiline text does not appear 
as expected

It is no way to skip or select desired EOL normalization style here

      AddChar := True;
      ByteCh := byte(W);

      if ByteCh = $0D then
      begin
// I have to comment this line to skip EOL normalization
//!!!////        ByteCh := $0A;
        LastChar0D := True;
      end else
      begin
        if (ByteCh = $0A) and LastChar0D then
          AddChar := False;
        LastChar0D := False;
      end;

Original issue reported on code.google.com by artem2m...@gmail.com on 17 Feb 2014 at 6:00