From c316cd982303f30f29075f31bcd910f9be38bb25 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 2 Mar 2019 17:15:47 +0100 Subject: Convert charset to utf8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Files imported in commit 98cab31fc3659e33aef260efca55bf9f1753164c were exported from EUMEL to DOS and used codepage 437/850(?). Convert files to UTF-8 where possible. Some files were left as-is. I’m not sure whether converting these would be correct. --- tools/highlight.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools/highlight.py') diff --git a/tools/highlight.py b/tools/highlight.py index ecdb49e..224d2d9 100755 --- a/tools/highlight.py +++ b/tools/highlight.py @@ -33,7 +33,6 @@ if __name__ == '__main__': destdir = '_build' f = sys.argv[1] - print (f) basedir = os.path.dirname (f) basedestdir = os.path.join (destdir, basedir) @@ -44,10 +43,12 @@ if __name__ == '__main__': try: with open (f, 'r') as srcfd: code = srcfd.read () - except UnicodeDecodeError: - # that’s fine + except UnicodeDecodeError as e: + # that’s expected for data files + print ('skipping', f, e) sys.exit (0) + print (f) lexer = get_lexer_by_name("elan", stripall=True) formatter = HtmlFormatter (linenos=True, lineanchors='line', anchorlinenos=True) with open (destf, 'w') as destfd: -- cgit v1.2.3