Menu

#7 Possible bug in sdWideToUTF8Buffer

New
nobody
None
Medium
Defect
2014-02-16
2014-02-16
Anonymous
No

Originally created by: artem2m...@gmail.com

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;

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.