=== modified file 'query.pl' --- query.pl 2016-02-29 14:15:42 +0000 +++ query.pl 2015-09-15 20:54:55 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/env swipl % vim: ft=prolog textwidth=80 tabstop=4 softtabstop=4 shiftwidth=4 expandtab -%% :- use_module(library(pure_input)). +:- use_module(library(pure_input)). %%% :- use_module(library(dcg/basics)). :- initialization main. @@ -155,7 +155,7 @@ parse_file(InFile) :- - ( open(InFile, read, Fd, [encoding(utf8)]), read_stream_to_codes(Fd, Codes) + ( open(InFile, read, Fd), read_stream_to_codes(Fd, Codes) -> true ; throw(read_error(InFile)) ), @@ -169,8 +169,6 @@ -> true ; throw(formatting_failed(InFile,Awk)) ), - current_stream(1, write, OutStream), - set_stream(OutStream, encoding(utf8)), format('~s', [Out]). main :- current_prolog_flag(argv, Argv), main(Argv).