process lines instead of characters v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sun, 05 May 2019 12:38:09 +0200
branchv_0
changeset 6 efa96f51b308
parent 5 86de8e6ab231
child 7 46db0e6e548b
process lines instead of characters
src/AwkHandler.h
--- a/src/AwkHandler.h	Sun May 05 12:37:43 2019 +0200
+++ b/src/AwkHandler.h	Sun May 05 12:38:09 2019 +0200
@@ -143,8 +143,8 @@
 					{L"message", writer::TypeId::STRING},
 				}, true);
 
-				for (wchar_t ch = awkOutputReader.get(); awkOutputReader.good(); ch = awkOutputReader.get()) {
-					relationalWriter->writeAttribute(string_t(1, ch));
+				for (string_t line; getline(awkOutputReader, line).good();) {
+					relationalWriter->writeAttribute(line);
 				}
 
 				closeOrThrow(awkOutputReaderFD);