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
merged 1 commit into from Apr 30, 2017

Conversation

Projects
None yet
1 participant
@ddfreyne
Member

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

codecov/patch 100% of diff hit (target 98.66%)
Details
codecov/project 98.67% (+<.01%) compared to 516a1fb
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@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