JavaScript文件自动损坏 [英] Javascript files getting corrupted automatically

查看:83
本文介绍了JavaScript文件自动损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的系统发生了一件奇怪的事情,
我的JavaScript文件已自动损坏。像这样:

A strange thing happening to my system, My JavaScript files are getting corrupted automatically. like this:

�������������������������������������

我从没碰过哪个文件

如果我用备份替换了损坏的文件,那么其他任何文件也再次损坏了,这很奇怪。我确定它不会因任何病毒而崩溃,我已经通过许多防病毒软件测试了我的整个localhost文件。

if I replace corrupted file with backup then again any other file get corrupted, This strange thing is happening in my whole localhost. I am sure it is not happaning due to any virus, I have tested my whole localhost files by many antivirus.

浏览器是否正在执行此操作?,导致哪些文件损坏了,只能通过浏览器访问它们。

Is browser is doing this ?, cause which files are corrupting, they are only accessed by browser.

请帮助我。

推荐答案

<通常,这些问题可能是由于编码所致。如果您的JS文件以与您的网络浏览器不同的编码保存,那么您会看到奇怪的问号。

Often these issues can be due to encoding. If your JS files are saved in a different encoding than your web browser is expecting, then you see the strange question marks.

Joel在他的博客上发表了一篇很棒的有关编码的文章尽管它很长,但我还是建议您阅读它,以更好地理解编码及其工作原理(如果您还不熟悉的话)。

Joel has a great post about encoding on his blog and although it's kind of long I do suggest you read it to get a better understanding of encoding and how it works, if you are not already familiar with it.

顺便说一句,UTF-8是互联网上最流行的编码!

By the way, UTF-8 is the most popular encoding on the internet for a reason! Check it out.

http:// www.joelonsoftware.com/articles/Unicode.html

这篇关于JavaScript文件自动损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆