jagregory / atom-pandoc-preview

Pandoc-powered Previewer for Atom
MIT License
14 stars 7 forks source link

Doesn't recognize UTF8 in preview #17

Closed retrography closed 9 years ago

retrography commented 9 years ago

It displays UTF-8 texts as ISO Western, which results in the following:

screen shot 2015-01-10 at 7 11 24 pm

The html generated using the same switches displays fine in Chrome or Safari.

jagregory commented 9 years ago

I'm guessing this is a Atom node-webkit issue we don't have much control over. We're just embedding HTML in Atom.

retrography commented 9 years ago

I verified and this is actually a limitation inherent to bibtex. Just FYI...

monoblaine commented 9 years ago

@retrography

In pandoc-view.coffee, change the frame property as follows:

frame: (html) ->
    @html $$$ ->
      @iframe src: "data:text/html;charset=utf-8, #{encodeURI html}"

You might also need to remove --ascii from args in pandoc.coffee.

retrography commented 9 years ago

@monoblaine Interesting. Thanks. I will try it.