guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

128/376: nix-log2xml: Handle UTF-8 characters


From: Ludovic Courtès
Subject: 128/376: nix-log2xml: Handle UTF-8 characters
Date: Wed, 28 Jan 2015 22:04:30 +0000

civodul pushed a commit to tag 1.8
in repository guix.

commit e9b609bf9ae301eb415227e76b6ae904881c07eb
Author: Eelco Dolstra <address@hidden>
Date:   Wed Aug 13 19:00:07 2014 +0200

    nix-log2xml: Handle UTF-8 characters
    
    C++ chars can be negative...
---
 src/nix-log2xml/log2xml.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/nix-log2xml/log2xml.cc b/src/nix-log2xml/log2xml.cc
index 6645dc5..e26fb00 100644
--- a/src/nix-log2xml/log2xml.cc
+++ b/src/nix-log2xml/log2xml.cc
@@ -137,7 +137,7 @@ void Decoder::finishLine()
         if (line[i] == '<') cout << "&lt;";
         else if (line[i] == '&') cout << "&amp;";
         else if (line[i] == '\r') ; /* ignore carriage return */
-        else if (line[i] < 32 && line[i] != 9) cout << "&#xfffd;";
+        else if (line[i] >= 0 && line[i] < 32 && line[i] != 9) cout << 
"&#xfffd;";
         else if (i + sz + 33 < line.size() &&
             string(line, i, sz) == storeDir &&
             line[i + sz + 32] == '-')



reply via email to

[Prev in Thread] Current Thread [Next in Thread]