From d91c9f1fba36bf9085d3feb5cd6fd2e83defc20a Mon Sep 17 00:00:00 2001 From: Elvish_Hunter Date: Sun, 2 Aug 2015 22:03:57 +0200 Subject: [PATCH] wmllint and wmliterator: open files as UTF-8 and use Unicode literals This is a single commit, because modifying only one of the two files broke the other --- data/tools/wesnoth/wmliterator.py | 18 +++++++------- data/tools/wmllint | 41 +++++++++++++++++-------------- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/data/tools/wesnoth/wmliterator.py b/data/tools/wesnoth/wmliterator.py index 00ded530d04..024d16099fc 100644 --- a/data/tools/wesnoth/wmliterator.py +++ b/data/tools/wesnoth/wmliterator.py @@ -20,7 +20,9 @@ Limitations: enough for now. """ -import sys, re, copy +from __future__ import unicode_literals + +import sys, re, copy, codecs keyPattern = re.compile('(\w+)(,\s?\w+)*\s*=') keySplit = re.compile(r'[=,\s]') tagPattern = re.compile(r'(^|(?