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

关于文章里有非 utf-8 格式的字符时,搜索会卡住 #30

Closed
MuYunyun opened this issue Feb 4, 2018 · 5 comments
Closed

Comments

@MuYunyun
Copy link

MuYunyun commented Feb 4, 2018

This page contains the following errors:
error on line 53 at column 333: Input is not proper UTF-8, indicate encoding !
Bytes: 0x08 0x50 0x79 0x74
Below is a rendering of the page up to the first error.

用的是 hexo-next-theme 的主题,点击搜索时,一直在加载动画,bug 重现,以及 xml 文件,但是尽管它抛出了具体的行列,目前我锁定不了到底是哪里的字符是非 utf-8 格式,
image

ps: 是不是需要在哪里设置解析的格式为 utf-8 呢?求助

@MuYunyun
Copy link
Author

MuYunyun commented Feb 4, 2018

#8
似乎和这个关闭的 issue 有关,但是我在里面没有找到解决方法。这个问题和主题无关,和字体编码有关,希望解决的朋友能告知方法。

@a632079
Copy link

a632079 commented Feb 17, 2018

Could you use english please?
The Maintenance is not Chinese

@wzpan
Copy link
Owner

wzpan commented Feb 19, 2018

@MuYunyun 已发布新版,做了一些编码优化,试试升级到 2.2.0 看看问题是否已解决

cd YOUR_HEXO_PATH
npm install --upgrade --save hexo-generator-search

@MuYunyun
Copy link
Author

@wzpan I'm sorry the problem hasn't been solved. Maybe the xml format is ISO-8859-1 through the article. So can you provide some support for this format ? Thanks.

@MuYunyun
Copy link
Author

MuYunyun commented Mar 23, 2018

Following the writer's advice -- change the xml format to json format, soved the problem. 👍 Howerver, do this, the package of hexo-generator-search is not usable.

_config.yml
search:
  path: search.json
  field: post
  format: html
  limit: 10000

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

3 participants