版权所有©字符符号引导文件加载失败 [英] Copyright © character symbol lead file load fail

查看:270
本文介绍了版权所有©字符符号引导文件加载失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#region版权所有©2001-2003 xxx [account@mail.net]  - >>> #region版权所有? 2001-2003 xxx [account@mail.net]

/ *

 评论

  * /

#endregion

#region Copyright © 2001-2003 xxx[account@mail.net]  ->>>#region Copyright ? 2001-2003 xxx[account@mail.net]
/*
 comment
 */
#endregion

--------------------------

Microsoft Visual Studio

---------------------------

文件加载



加载文件C时,某些字节已被Unicode替换字符替换:\ Users \vc10sp1 \Documents\src \ class1.cs与繁体中文(Big5)编码。保存文件不会保留原始文件内容。

---------------------------



---------------------------

--------------------------
Microsoft Visual Studio
---------------------------
File Load

Some bytes have been replaced with the Unicode substitution character while loading file C:\Users\vc10sp1\Documents\src\class1.cs with Chinese Traditional (Big5) encoding. Saving the file will not preserve the original file contents.
---------------------------

---------------------------

并且类文件与版本控制不匹配。我知道这是一个长期困扰我的编码问题。

And the class file will not match with version control. I know it's a encoding problem which had for a long time annoyed me.

推荐答案

当您遇到此类问题时,原因是您尝试使用的字符在该代码页中不存在。

When you get that kind of problem, it is because the character that you are trying to use doesn't exist in that codepage.

从我所看到的,Big5 / Codepage 950根本没有版权符号©作为代码页中的一个字符。 Visual Studio在内部使用Unicode,Unicode在U + 00A9上使用了Unicode,因此当Visual Studio尝试保存文件时,
将逐个浏览每个字符,并尝试将其转换为目标代码页。当然,如果目标代码页中不存在该字符,则Visual Studio将无法表示该字符。

From what I can see, Big5/Codepage 950 does not have the copyright symbol © as one of the characters in the codepage at all. Visual Studio uses Unicode internally and Unicode does have © at U+00A9, so when Visual Studio tries to save the file, it will go through each character one at a time and try to convert it to the target codepage. Of course, if that character does not exist in the target codepage, then Visual Studio will be unable to represent that character at all.

解决此问题的唯一方法是保存到代码页那个确实有字符的地方,首选Unicode。您可以通过在Visual Studio编辑器中打开要保存的文件来执行此操作,选择Save< file>作为...并选择保存旁边的小
向下指向三角形,然后选择保存编码...

The only way to fix this is to save to a codepage that that does have the character, where Unicode is preferred. You can do this by having the file that you wish to save open in the Visual Studio editor, select Save <file> As... and select the little downward pointing triangle next to Save, and then select Save With Encoding...

当然,最大的问题是编码是什么在源代码管理中看到的文件?这就是你应该把它保存为。

Of course, the big question is what encoding is the file seen as in source control? That is what you should be saving it as.


这篇关于版权所有©字符符号引导文件加载失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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