Closed michaellopez closed 11 years ago
The documentation for hash.update() states that if no encoding is given, the argument is expected to be a Buffer.
Like many other "hash tasks" for Grunt, grunt-md5 provides the contents of the file as a string to hash.update without any encoding as a second argument, which is incorrect.
hash.update
The result of this is an incorrect hash for files with international characters in them when no encoding is given to hash.update.
Setting the proper encoding when calling hash.update fixes this.
Thanks! :heart:
The documentation for hash.update() states that if no encoding is given, the argument is expected to be a Buffer.
Like many other "hash tasks" for Grunt, grunt-md5 provides the contents of the file as a string to
hash.update
without any encoding as a second argument, which is incorrect.The result of this is an incorrect hash for files with international characters in them when no encoding is given to
hash.update
.Setting the proper encoding when calling
hash.update
fixes this.