Commit 7a0f2cf7 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Back down a little bit on UTF-8 in .vcc files.

Not ready to tackle the Python2/Python3 monster a week before release.
parent 90868639
...@@ -858,8 +858,9 @@ class vcc(object): ...@@ -858,8 +858,9 @@ class vcc(object):
def parse(self): def parse(self):
global inputline global inputline
a = "\n" + open(self.inputfile, "r").read() b = open(self.inputfile, "rb").read()
self.file_id = hashlib.sha256(bytearray(a)).hexdigest() a = "\n" + b.decode("utf-8")
self.file_id = hashlib.sha256(b).hexdigest()
s = a.split("\n$") s = a.split("\n$")
self.copyright = s.pop(0).strip() self.copyright = s.pop(0).strip()
while s: while s:
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE. # SUCH DAMAGE.
# #
# Test vmodtool.py's UTF-8 handling: Æbleflæsk med koldskål eller øl
$Module debug 3 Development, test and debug $Module debug 3 Development, test and debug
$ABI strict $ABI strict
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment