Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infer code snippet encoding #1174

merged 1 commit into from Apr 30, 2017

Infer code snippet encoding #1174

merged 1 commit into from Apr 30, 2017


Copy link

@ddfreyne ddfreyne commented Apr 30, 2017

Fixes #1171.

Turns out that eval’ing a string that has a magic comment (e.g. # encoding: iso-8859-1) already (incorrectly) attempts to do the encoding handling. To work around that, Nanoc now reads the content in the specified encoding, converts it to UTF-8, and removes the magic comment before passing it to eval. Yuck!

(I have not found any other way that makes the tests pass.)

@ddfreyne ddfreyne merged commit f19fc61 into master Apr 30, 2017
3 checks passed
@ddfreyne ddfreyne deleted the infer-encoding branch Apr 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant