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

When file contains danish letters æøå the conversion won't happen. #44

Closed
Poetastrophe opened this issue Aug 12, 2022 · 4 comments
Closed

Comments

@Poetastrophe
Copy link

When file contains danish letters æøå the conversion won't happen.

To reproduce:

  1. make a markdown file in your vimwiki folder (here I called it test2.md)
  2. When I write the following and run Vimwiki2HTML from nvim
1. ø
  1. I get the following error:
Vimwiki: '/home/chris/.local/share/gem/ruby/3.1.0/gems/vimwiki_markdown-0.8.2/lib/vimwiki_markdown/wiki_body.rb:52:in `gsub!'': invalid byte sequence in US-ASC
II (ArgumentError)
        from /home/chris/.local/share/gem/ruby/3.1.0/gems/vimwiki_markdown-0.8.2/lib/vimwiki_markdown/wiki_body.rb:52:in `convert_wiki_style_links_with_title_b
ar!''
        from /home/chris/.local/share/gem/ruby/3.1.0/gems/vimwiki_markdown-0.8.2/lib/vimwiki_markdown/wiki_body.rb:45:in `fixlinks''
        from /home/chris/.local/share/gem/ruby/3.1.0/gems/vimwiki_markdown-0.8.2/lib/vimwiki_markdown/wiki_body.rb:18:in `to_s''
        from /home/chris/.local/share/gem/ruby/3.1.0/gems/vimwiki_markdown-0.8.2/lib/vimwiki_markdown.rb:16:in `convert_wikimarkdown_to_html''
        from /home/chris/.local/share/gem/ruby/3.1.0/gems/vimwiki_markdown-0.8.2/bin/vimwiki_markdown:4:in `<top (required)>''
        from /home/chris/.local/share/gem/ruby/3.1.0/bin/vimwiki_markdown:25:in `load''
        from /home/chris/.local/share/gem/ruby/3.1.0/bin/vimwiki_markdown:25:in `<main>''
'
Vimwiki: HTML conversion is done, output: /home/chris/life/site_html/
@Poetastrophe
Copy link
Author

Things magically work when I use

$ export RUBYOPT="-KU -E utf-8:utf-8"

I don't understand why ;)

@patrickdavey
Copy link
Owner

patrickdavey commented Aug 12, 2022 via email

@patrickdavey
Copy link
Owner

This is a little bit interesting. I don't quite understand how the input file is being treated like that. Can you attach the .md file here, I'm just curious to see exactly how it is encoded.

Also, can you run vim and then type :set fileencodings and let me know what it prints out.

Bit strange. I tried copying that text into a file and converting it. Mine correctly was written out as UTF-8 and converted fine.

What operating system are you using?

@patrickdavey
Copy link
Owner

Closing as cannot reproduce. Please re-open if you can either supply the file / give steps to reproduce :)

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

No branches or pull requests

2 participants