admin管理员组文章数量:1410712
I have recently integrated MomentJS library into my application and have been running into a weird issue. Browser I have to use is IE9.
When I launch the application for the first time with zh-cn locale, I see a few junk characters in place of date and time. When I log out and log in again, then the characters load properly.
I check the encoding on screen and see it is UTF-8 both times. The issue is not consistent. I am at a loss as in what should I do to debug or get to the root of this issue. Any pointers about what I should check would be appreciated.
I have recently integrated MomentJS library into my application and have been running into a weird issue. Browser I have to use is IE9.
When I launch the application for the first time with zh-cn locale, I see a few junk characters in place of date and time. When I log out and log in again, then the characters load properly.
I check the encoding on screen and see it is UTF-8 both times. The issue is not consistent. I am at a loss as in what should I do to debug or get to the root of this issue. Any pointers about what I should check would be appreciated.
Share Improve this question edited Oct 8, 2014 at 5:42 Chiranjib asked Oct 6, 2014 at 11:11 ChiranjibChiranjib 1,7832 gold badges17 silver badges29 bronze badges1 Answer
Reset to default 9For integrating the MomentJS library, instead of
<script src="moment-with-locales.js"></script>
use this
<script src="moment-with-locales.js" charset="UTF-8"></script>
本文标签: javascriptEncoding issue while integrating Moment JS libraryStack Overflow
版权声明:本文标题:javascript - Encoding issue while integrating Moment JS library - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744792655a2625385.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论