src/NullByteHandler.h
branchv_0
changeset 24 d698d34baf9b
parent 23 b717a552e63f
child 25 58de33c1af03
equal deleted inserted replaced
23:b717a552e63f 24:d698d34baf9b
    50 
    50 
    51 	}
    51 	}
    52 
    52 
    53 	void attribute(const string_t& value) override {
    53 	void attribute(const string_t& value) override {
    54 		const std::string octets = convertor.to_bytes(value);
    54 		const std::string octets = convertor.to_bytes(value);
    55 		for (char ch : octets) output.put(ch ? ch : '@');
    55 		for (char ch : octets) {
       
    56 			if (ch) output.put(ch);
       
    57 			else output.put('@'); // TODO: configurable replacement, maybe a string instead of a single char
       
    58 		}
    56 		output.put(0);
    59 		output.put(0);
    57 	}
    60 	}
    58 
    61 
    59 	void endOfPipe() {
    62 	void endOfPipe() {
    60 		output.flush();
    63 		output.flush();