summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2019-03-02 17:15:47 +0100
committerLars-Dominik Braun <lars@6xq.net>2019-03-02 17:15:47 +0100
commitc316cd982303f30f29075f31bcd910f9be38bb25 (patch)
tree12ba04bd0f2a94bd48583ee5f2ab269b6ba5c8b3 /tools
parent50acf53648b6562853cb26aa4e7062a5ced66908 (diff)
downloadeumel-src-master.tar.gz
eumel-src-master.tar.bz2
eumel-src-master.zip
Convert charset to utf8HEADmaster
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.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/highlight.py7
1 files changed, 4 insertions, 3 deletions
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: