shiwano/grunt-yaml — pull request #11 by nathanrosspowell (2014-07-11 04:58:56+00:00)
Title: Added readEncoding and writeEncoding options

When working with files that do not match the
`grunt.file.defaultEncoding` setting, it was not possible to get all
of the information from the file. For example; when the default
encoding is set to `utf8` you couldn't read in accented characters
from a file with a different encoding.

With this change encodings for both file read and file write can be
specified in the `options` object so that task can read files
appropriately and write them out as the user wishes.

For my use case I was losing French accented characters from my YAML
files. The solution was to read them in using the `latin1` encoding
(Grunt supports `latin1` through the use of `iconv-lite`). Once the
file content was read it can happily be written back out as JSON in
`utf8`, which was my default encoding.

Summary:

* Able to read in YAML and write out JSON with different encodings

* Both options default to `grunt.file.defaultEncoding`

* Update README.md with documentation for the options