Commit 6527437c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Dridi Boukelmoune

Don't attempt to normalize .vcc file encoding, just take the bytes

Fixes #2761
parent 54da09da
......@@ -859,7 +859,7 @@ class vcc(object):
def parse(self):
global inputline
a = "\n" + open(self.inputfile, "r").read()
self.file_id = hashlib.sha256(a.encode('utf-8')).hexdigest()
self.file_id = hashlib.sha256(bytearray(a)).hexdigest()
s = a.split("\n$")
self.copyright = s.pop(0).strip()
while s:
......
......@@ -24,6 +24,8 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# Test vmodtool.py's UTF-8 handling: Æbleflæsk med koldskål eller øl
$Module debug 3 Development, test and debug
$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