Closed peti closed 10 years ago
What operating system are you using? My guess would be that $LANG
is not set correctly, see http://jaspervdj.be/hakyll/tutorials/faq.html#hgetcontents-invalid-argument-or-commitbuffer-invalid-argument.
Wouldn't it be better if the test suite were independ on that particular environment variable? As far as I know, the encoding can be configured per-handle using the function hSetEncoding?
I could do that, but in the Hakyll library, the files are read using readFile
. This ensures we use the encoding chosen by the user (which is not always UTF-8). UTF-8 is the default encoding for Hakyll, but it is never enforced.
I can't differ from that in the test suite because then I wouldn't be testing the actual Hakyll code... so I picked UTF-8 for the tests as a default. I agree that this isn't straightforward, but I can't figure out a good solution at this point.
I believe that there ought to be a way to set the encodnig used for file i/o through the Hakyll API. If that feature were available, then the test suite could read and process files with a specific encoding reliably without depending on the shell environment. Furthermore, this would allow users to mix files with different encodings in the same site.
This also affects the Debian packaging, which runs the test suite as part of the automatic package building, and that needs to work in different environments.
@peti's suggestion sounds good to me.
This seems gone.
Thanks for the heads-up!
I did follow the steps in the FAQ but I still get the error when including font-awesome files.