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

Garbled code will be generated if .md file contains too many Chinese characters #23

Open
yangg opened this issue Nov 18, 2016 · 7 comments
Labels

Comments

@yangg
Copy link

yangg commented Nov 18, 2016

This issue is originally posted at ahonn/hexo-theme-even#46

I have the same problem,
Here is the md file
https://raw.githubusercontent.com/yangg/blog/master/source/_posts/weixin-app.md

@NoahDragon
Copy link
Member

NoahDragon commented Nov 18, 2016

Hmmm, definitely an issue. But is it the rendering issue or the server issue?

hexojs/hexo#2171

@yangg
Copy link
Author

yangg commented Nov 19, 2016

It renders correct after deploy, so I file the issue here.

@tanchao90
Copy link

mark 遇到同样的问题,好疑惑

@DMXL
Copy link

DMXL commented Mar 23, 2017

Sometimes the 'over-flooded' Chinese characters just get cut out, instead of being replaced by random symbols.

@resettingmq
Copy link

resettingmq commented Apr 23, 2017

Still got the same result on hexo: 3.3.1 when rendered in the localhost, but it's rendered correctly on github.

It seems that the response is corrupt. The end of response body seems to be truncated and mixed up with some, e.g.:

 <script type="text/javascript" src="/ "undefined" && _ctx.name !== null) ? ((typeof _ctx.name !== "undefined" && _ctx.name !== null) ? _ctx.name : "") : ((typeof name !== "undefined" && name !== null) ? name : "")) !== null ? ((t

It should be something like:

<script type="text/javascript" src="/js/src/motion.js?v=5.1.1"></script>
<script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.1"></script>
<script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.1"></script>

instead.

@wayou
Copy link

wayou commented Jun 9, 2017

This's actually a regression caused by commit 4103a75.

By enabling the compression can quickly avoid this problem:

server:
  compress: true

@mcfatealan
Copy link

The solution of @wayou is actually correct. But the description seems inconsistent with code? disabling or enabling?

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

No branches or pull requests

7 participants