# HG changeset patch # User František Kučera # Date 1557157609 -7200 # Node ID f911910fd68f629d18cb503ddef1a8620a577a4d # Parent b064f1b3676e84a7d8e265024763ef3a802f2e62 support non-ascii texts diff -r b064f1b3676e -r f911910fd68f src/AwkHandler.h --- a/src/AwkHandler.h Mon May 06 16:06:57 2019 +0200 +++ b/src/AwkHandler.h Mon May 06 17:46:49 2019 +0200 @@ -155,6 +155,8 @@ // Writer child process closeOrThrow(awkInputWriterFD); + locale::global(locale("")); // needed for processing unicode texts, otherwise getline() stopped working on first line with non-ascii characters; TODO: move somewhere else? + __gnu_cxx::stdio_filebuf awkOutputReaderBuffer(awkOutputReaderFD, std::ios::in); std::wistream awkOutputReader(&awkOutputReaderBuffer);