foundweekends/pamflet

add support for UTF-8 encoding of docs

eschreiner opened this issue · 3 comments

Currently, all files in the docs / SRC folder are read using the default encoding, e.g. ISO-8859-1 / Latin-1. I suggest to add an optional setting to the file template.properties allowing to specify a custom file encoding.

With this enhancement, you can specify the desired encoding in the file template.properties using the entry inputEncoding, e.g. inputEncoding=UTF-8. The Template trait was extended by a function defaultEncoding that falls back to the default CharSet's name, in particular windows-1252 on a Windows machine.

I think there's a way to change the jvm default at least on Linux. But this way of doing it makes more sense, so you can generate docs without any configuration specific to the machine.

Actually, you can use -Dfile.encoding=UTF8 or set the environment variable _JAVA_OPTIONS accordingly. See also e.g. http://stackoverflow.com/questions/1128617/java-default-encoding
Thank you so much for accepting my pull request :-)