xml 使用 Wix 在安装程序中插入版权/注册符号

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11070209/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-06 13:32:30  来源:igfitidea点击:

Inserting a copyright / registered symbol in the installer using Wix

xmlwixwix3.5

提问by eddie

I want to know if one a particular dialog i want to insert a copyright symbol , how would i do that i insert the symbol in th text options in the xml file howevr it results in an error while compiling the .wxs file.

我想知道是否有一个特定的对话框我想插入版权符号,我将如何在 xml 文件的文本选项中插入符号,但是在编译 .wxs 文件时会导致错误。

Thanks

谢谢

回答by Alexey Ivanov

You have to make sure you save the WiX XML in UTF-8 encoding. The easiest way is to open the XML in Notepad, click Fileand then click Save as. Select UTF-8in the Encodinglist. And overwrite your current XML file.

您必须确保以 UTF-8 编码保存 WiX XML。最简单的方法是在记事本中打开 XML,单击文件,然后单击另存为。在编码列表中选择UTF-8。并覆盖您当前的 XML 文件。

Another way is use character codes: ©for copyright and ®for registred symbols.

另一种方法是使用字符代码:©用于版权和注册®符号。



The thing is the regular English letters, or ASCII, are validUTF-8 characters as they fit into 7-bits. The copyright and registred symbols are not valid characters because in UTF-8 they have to be encoded as two bytes rather than one.

问题是常规英文字母或 ASCII 是有效的UTF-8 字符,因为它们适合 7 位。版权和注册符号不是有效字符,因为在 UTF-8 中它们必须被编码为两个字节而不是一个字节。

回答by SelfTeacher

Here is a solution:

这是一个解决方案:

  1. Copy the notepad++ file text say "index.html" into plain old notepad

  2. Close the notepad++ file.

  3. Re type the text where you want the Copyright symbol by holding down Fn+alt typing 0169 on the keypad

  4. Save the plain notepad file as (all Files) index.html to the folder your index.html file is in when asked to overwrite click yes.

  5. Now open the file using notepad++ and this file when saved after any other edits will not produce the accented A beside the copyright symbol ??

  1. 将记事本++文件文本说“index.html”复制到普通的旧记事本中

  2. 关闭记事本++文件。

  3. 通过按住 Fn+alt 在键盘上输入 0169,重新输入您想要版权符号的文本

  4. 将普通记事本文件另存为(所有文件)index.html 到您的 index.html 文件所在的文件夹中,当要求覆盖时单击是。

  5. 现在使用记事本 ++ 打开文件,在任何其他编辑后保存此文件时,版权符号旁边不会产生带重音的 A ??

I do not know why the saved version in notepad++ works after "cleansing" in plain notepad but I have not had any other problems using the method to date.

我不知道为什么记事本 ++ 中保存的版本在普通记事本中“清理”后可以工作,但迄今为止我没有使用该方法遇到任何其他问题。