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


None yet
1 participant
Copy link

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 force-pushed the infer-encoding branch from f853a5d to e12cb90 Apr 30, 2017

@ddfreyne ddfreyne merged commit f19fc61 into master Apr 30, 2017

3 checks passed

codecov/patch 100% of diff hit (target 98.66%)
codecov/project 98.67% (+<.01%) compared to 516a1fb
continuous-integration/travis-ci/pr The Travis CI build 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
You can’t perform that action at this time.