Some bytes have been replaced with the Unicode substitution character while loading file
需要修改一较旧的网页代码,当打开时,却出现异常提示:
Some bytes have been replaced with the Unicode substitution
character while loading file 【文档路径】 with
Unicode(UTF-8) encoding. Saving the file will not preserve the
original file contents.
点“OK”,文档是可以打开,但是一些中文不能正常显示,如下箭头所指。

如何办? 新建与较新的文档却没有这种情况。说明确定开发的电脑是支持UTF-8的。
不过,还是得检查电脑的设置。
打开Control Planel--> Clock and Region --> Region --> open "Administrative" tab -->
click "Change system locale..." button -->
把上面的Beta: Use Unicode UTF-8 for worldwide language support选项去选。
系统提示重启,设置才会生效。
再次打开文档,显示正常:
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 2分钟学会 DeepSeek API,竟然比官方更好用!
· .NET 使用 DeepSeek R1 开发智能 AI 客户端
· 10亿数据,如何做迁移?
· 推荐几款开源且免费的 .NET MAUI 组件库
· c# 半导体/led行业 晶圆片WaferMap实现 map图实现入门篇
2017-10-12 实现Cookie集合
2015-10-12 实现多表关联来方便你的SELECT查询功能
2013-10-12 MVC用非Entity Framework将数据显示于视图(二)
2011-10-12 frameset框架中frame页面间传递参数