From 8443bdcb78c09d267c177a51641122a9def7da79 Mon Sep 17 00:00:00 2001 From: Yaroslav Vorobev Date: Thu, 2 Jan 2020 18:02:59 +0300 Subject: [PATCH] fix: utf-8 I got an error when tried to use utf-8 regexes. So, this fixed my case. --- exrex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exrex.py b/exrex.py index 7432be2..24c0de9 100644 --- a/exrex.py +++ b/exrex.py @@ -452,7 +452,7 @@ def argparser(): help='Output file - default is STDOUT', metavar='FILE', default=stdout, - type=argparse.FileType('w') + type=argparse.FileType('w', encoding='utf-8') ) argp.add_argument( '-l', '--limit',