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

E670 in neovim with the doc file #162

Closed
5 tasks
mhartington opened this issue Aug 16, 2016 · 15 comments
Closed
5 tasks

E670 in neovim with the doc file #162

mhartington opened this issue Aug 16, 2016 · 15 comments
Milestone

Comments

@mhartington
Copy link
Collaborator

Required Info

  • [ x ] I have searched the issues for my issue and found nothing related and/or helpful
  • [ x ] I have read or at least glanced at the FAQ
  • [ x ] I have read or at least glanced at the Wiki
  • What version of vim are you using?
    • hint: vim --version
      NVIM v0.1.5-459-g7df9dd3
  • What version of vim-devicons are you using?
    • hint: :echo webdevicons#version()
      0.8.3
  • Are you using vim from the terminal or a GUI vim?
    iTerm
  • Are you using Mac, Linux or Windows?
    Mac

Optional Info

  • Provide screenshots where appropriate
[dein] Error generating helptags:
[dein] Vim(helptags):E670: Mix of help file encodings within a language: /Users/mhartington/.config/nvim/.dein/doc/webdevicons.txt
[dein] function dein#end[1]..dein#util#_end[39]..dein#recache_runtimepath[1]..dein#install#_recache_runtimepath[20]..<SNR>8_helptags, line 12

I've been poking around in the doc file, trying to see where the error is coming from. Seems like bad encoding is happening in nvim, but not regular vim(7.4).

I'll try to hunt it down and look for the culprit and send a PR your way.

Cheers.

@ryanoasis
Copy link
Owner

Thanks and I appreciate it. Let me know if I can help but I might not be able to

@zchee
Copy link

zchee commented Aug 18, 2016

@ryanoasis I have the same issue.
I don't know help file encodings details, but maybe(not tested), it caused by added ✅ icon into the doc/webdevicons.txt?
It seems have not that icon on 1bd919e.

I will test it later.

@ryanoasis
Copy link
Owner

@zchee Hey thanks

@mhartington
Copy link
Collaborator Author

PR Sent 🎉

@ryanoasis
Copy link
Owner

Cool thanks for the fix. Ha who would have figured that would cause such a breaking issue 😛

I actually generate the vim doc file from the readme markdown using html2vimdoc so I might need to adjust something after it builds or it will recopy that glyph and I kind of like having it on the readme 😄

for reference: https://github.com/ryanoasis/vim-devicons/wiki/Development-Workflow

Anyway I am going to tag this for the next release 👍

@junkmechanic
Copy link

Hi,
I still face this issue with dein on nvim 0.1.6-72-gfe06e2a . Any pointers?

Thanks

@mhartington
Copy link
Collaborator Author

Same here. Maybe it has to do with html2vimdoc?

@ryanoasis
Copy link
Owner

@junkmechanic did you pull the latest devicons?

@junkmechanic
Copy link

hi @ryanoasis
my last pull was a few minutes before posting that comment. So, yes. :D .

Its when @mhartington mentioned that it could be an issue with html2vimdoc is when I glazed over the code. It explicitly encodes the output to utf-8 before printing it.
Speaking out of limited experience with shell redirection (and most other things for that matter), this could be an issue with how the output is being redirected to the doc file. You might want to modify the script so that one could give it an output file name that it could directly open a pointer to and dump the text.

@junkmechanic
Copy link

Posting relevant discussion from neovim chat group:

gitter_shougo[m]        vim-devicons documentation header has multibyte characters.  It is invalid.
gitter_shougo[m]        https://github.com/ryanoasis/vim-devicons/blob/master/doc/webdevicons.txt#L1
gitter_shougo[m]        It contains multibyte hyphen character.
gitter_zyx-i[m] @Shougo I do not see hyphen there, only EN DASH. Why is this a bug in webdevicons.txt and not in Vim/Neovim?
gitter_shougo[m]        Because,
gitter_shougo[m]        Posted a long message: http://matrix.org/_matrix/media/v1/download/matrix.org/phnufdgbTgnsucuuCAZZkemf - 2016-09-10_21:12:29.txt
gitter_shougo[m]        It is invalid character.
gitter_shougo[m]        The new is correct.
gitter_shougo[m]        Yes, it is hard to notice.
gitter_zyx-i[m] It is not invalid. EN DASH is exactly what should be used here, HYPHEN-MINUS is not the right character in all cases where it could be used.
gitter_zyx-i[m] * Not the right in all texts read by humans.
gitter_shougo[m]        Yes, it is not invalid in English
gitter_shougo[m]        It is invalid in Vim/neovim helpfile.
gitter_zyx-i[m] Text file is for reading by humans, so it is Vim/Neovim bug if they have any problems with HYPHEN-MINUS.
gitter_zyx-i[m] I have not seen any arguments for this being not valid in a help file.
gitter_zyx-i[m] And, by the way, how Vim/Neovim could work with translated help files if they can’t handle single EN DASH?
gitter_shougo[m]        The documentation title line must not contain multibyte characters.
gitter_shougo[m]        I think it is Vim/neovim feature.
gitter_shougo[m]        Posted a long message: http://matrix.org/_matrix/media/v1/download/matrix.org/qGuHJjrcxaCgKFXeumiSDxiR - 2016-09-10_21:20:02.txt
gitter_zyx-i[m] @Shougo Read `:h help-writing`. I do not see statements like “The documentation title line must not contain multibyte characters.”
gitter_shougo[m]        I think it is because the title lines are merged to "help.txt".
gitter_shougo[m]        I think it should be documented.
gitter_shougo[m]        http://vim.1045645.n5.nabble.com/E670-Mix-of-help-file-encodings-within-a-language-td5710927.html
gitter_shougo[m]        Posted a long message: http://matrix.org/_matrix/media/v1/download/matrix.org/jNNhVAFKFnlGGVYuLYhzdZfu - 2016-09-10_21:22:37.txt
gitter_shougo[m]        Posted a long message: http://matrix.org/_matrix/media/v1/download/matrix.org/TSmUvbpXvqJJOuqrrgyUserl - 2016-09-10_21:23:11.txt
gitter_shougo[m]        Posted a long message: http://matrix.org/_matrix/media/v1/download/matrix.org/CCiFeFyEOgrdeWTCkCyFjwft - 2016-09-10_21:23:52.txt
gitter_shougo[m]        Thirs is 4 years ago post.
gitter_shougo[m]        Some Vim contributors answered.  (No Bram's answer though)
gitter_zyx-i[m] This still looks like a bug. And people there think it is a bug.
gitter_shougo[m]        https://groups.google.com/d/msg/vim_dev/kIY3ut_smBk/vx88qMKQLb4J
gitter_shougo[m]        It is sent to vim_dev in 2008.
gitter_shougo[m]        Bram says it is feature.
gitter_shougo[m]        neovim can change the feature though.

Not sure when they intend to fix this feature/bug in neovim, but in the meantime, would it be possible to change the hyphen in the title of the doc?

@mhartington
Copy link
Collaborator Author

hey @ryanoasis, sorry to ping, but could this be reopened? Looks like it's still around, and the explanation seem to be legit.

Will try to PR.

@ryanoasis
Copy link
Owner

@mhartington Darn. Yeah sure go for it.

I did update the build notes so it doesn't accidentally make it's way back: https://github.com/ryanoasis/vim-devicons/wiki/Development-Workflow

But maybe there is another character causing issues.

Good luck

@mhartington
Copy link
Collaborator Author

mhartington commented Oct 19, 2016

Tested it out locally, it is indeed that - in the title that causes the issue

From the looks of it, just removing that and dropping the Add Icons to Your Plugins part down a line seems to be fine

@ryanoasis
Copy link
Owner

Tested it out locally, it is indeed that - in the title that causes the issue

Makes sense

From the looks of it, just removing that and dropping the Add Icons to Your Plugins part down a line seems to be fine

I'd prefer to keep it as is. Maybe replace the dash with a hyphen -. Does that also solve it?

@mhartington
Copy link
Collaborator Author

PR sent!

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

4 participants