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

Incompatible special characters #427

Closed
Phyllo opened this issue Apr 23, 2014 · 11 comments
Closed

Incompatible special characters #427

Phyllo opened this issue Apr 23, 2014 · 11 comments

Comments

@Phyllo
Copy link

Phyllo commented Apr 23, 2014

Hi!
I just found and installed nanoc to see what it could do for me. I followed the steps in the installation and tutorial pages to create the tutorial site. Unfortunately, the special characters generated are quite weird:
nanoc_tutorial
This is an excerpt of the generated index.html:

  • Change this pageÔÇÖs content by editing the ÔÇ£index.htmlÔÇØ file in the ÔÇ£contentÔÇØ directory. This is the actual page content, and therefore doesnÔÇÖt include the header, sidebar or style information (those are part of the layout).

  • and this is the output of nanoc -v:
    nanoc 3.6.9 © 2007-2013 Denis Defreyne.
    Running ruby 1.9.3 (2014-02-24) on i386-mingw32 with RubyGems 2.2.2.

    I'm using windows 8.1 64 bit, German version.

    I tried searching for special characters in the existing issues but didn't find anything matching my issue.

    Any ideas on what's going wrong and how to fix it?

    Thanks!

    @denisdefreyne
    Copy link
    Member

    That almost looks like a foreign language :)

    The nanoc web site has a troubleshooting section dedicated to weird characters. Let me know if the troubleshooting section fixes your problem (it should, but you never know).

    To prevent this issue in the future, I think the default nanoc configuration should already come with the encoding filled in (i.e. encoding: utf-8). I’ll open a pull request for this soon.

    @denisdefreyne
    Copy link
    Member

    PR for setting the default encoding to UTF-8 is #428.

    @Phyllo
    Copy link
    Author

    Phyllo commented Apr 23, 2014

    Thanks for the hint which would probably fix this issue if I could get it to run. I tried to follow it but I'm doing something wrong, apparently nanoc is very strict regarding indentation. I simply copied and pasted
    encoding: utf-8
    from the place you mentioned but when I try to run nanoc again, it crashes with the error message "found a tab that violate intendation" - which should be indentation actually. ;)
    Here you see my nanoc.yaml in notepad++ together with the error message
    indentation
    I tried to fix it using a tab or white spaces but neither worked.
    The line 1234... was only added to show where exactly is column 15 on line 41, it was not there when I ran into the error.

    @denisdefreyne
    Copy link
    Member

    The tab in front of the encoding: utf-8 should be four spaces rather than a real tab.

    By the way, the best place for support requests is the Google discussion group. GitHub issues is used to track bugs.

    @Phyllo
    Copy link
    Author

    Phyllo commented Apr 23, 2014

    I only answered here since you said I should let you know if the troubleshooting section fixes the issue and it did not. As I said, I played around with spaces and tabs and neiter worked. I deleted all white spaces in that line and added four spaces in front of it and one between the colon and the 'u' but it still shows this error at column 15 which actually would be the 'u', not the space in front of it if I'm not mistaken. If I don't find a fix, I'll move to the group and re-post it there.

    @denisdefreyne
    Copy link
    Member

    Can you copy-paste the contents of the config file on gist?

    @denisdefreyne
    Copy link
    Member

    Ahh, perhaps you have a tab character after the : character in encoding: utf-8. That should be a space as well.

    @Phyllo
    Copy link
    Author

    Phyllo commented Apr 23, 2014

    No, I checked that as well. Here you go:
    https://gist.github.com/Phyllo/11233183

    @denisdefreyne
    Copy link
    Member

    Looks like the blank line after encoding: utf-8 has a tab in it. Get rid of that, and the site should compile again.

    @Phyllo
    Copy link
    Author

    Phyllo commented Apr 23, 2014

    Thanks, that worked and next time, I'll check anywhere around the indicated error. Now, the site shows as it should. :)

    @denisdefreyne
    Copy link
    Member

    Alright, good to hear. I’ll close the issue now, but feel free to let me know if you experience further problems.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants