-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly set local encoding to UTF-8 in site.hs (#255)
This change makes sure that the site executable *always* expects UTF-8, regardless of any locale environment variables. This should avoid problems like #29 and #249 in a more robust way than trying to set the right environment variables in `buildAndWatch` or `shell.nix`. The diff ended up a bit noisy because of indentation changes; the key change was adding `Encoding.setLocaleEncoding Encoding.utf8` to the beginning of `main`. I tested this by reproducing the Unicode error (using `nix-shell --pure`) and checking that the Haskell code change fixes the problem.
- Loading branch information
1 parent
f36b210
commit 9de64d8
Showing
3 changed files
with
52 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters