MS Office超链接更改代码页? [英] MS Office hyperlinks change code page?

查看:197
本文介绍了MS Office超链接更改代码页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将以下网址粘贴到IE时: http:// technet。 microsoft.com/en-us/sysinternals/bb897434.aspx ,页面右侧的链接清楚地说下载Zoomit(77 KB)。如果将链接粘贴到Office文档(Word,Excel,PowerPoint - 使用Office 2003测试),并激活文档中的链接,该相同的文本选择了几个A-circumflex符号。这是因为源HTML包含& nbsp;实体(非中断空间),它被转换为Unicode 00A0。在UTF-8中,这被表示为X'C2A0',然后X'C2'显示为A-circumflex。我不完全理解代码页如何混合起来像这样,但我真的想找到一个HTML元http-equiv字符集值,这将导致我的页面包含的实体,即使当链接从一个Office文档。

When you paste the following URL into IE: http://technet.microsoft.com/en-us/sysinternals/bb897434.aspx, the link on the right of the page cleanly says "Download Zoomit (77 KB)". If you paste the link into an Office document (Word, Excel, PowerPoint -- tested using Office 2003), and activate the link from the document, that same text has picked up a couple of A-circumflex symbols. This is because the source HTML contains " " entities (non-breaking space) which get translated to Unicode 00A0. In UTF-8, this is expressed as X'C2A0', and then the X'C2' gets displayed as a A-circumflex. I don't completely understand how the code pages get mixed up like this, but I'd really like to find a HTML meta http-equiv charset value that will cause my pages containing the nbsp-entity to display properly even when linked from an Office document.

推荐答案

我发现一个似乎有效的答案。首先我添加了一个警报来显示document.charset。当直接调用时显示utf-8,从MS Office文档中的超级链接调用时显示windows-1252。因此,我插入以下元标记,即使从Office文档调用时,页面似乎仍能正确显示。

I found an answer that seems to be working. First I added an alert to display the document.charset. This displayed "utf-8" when invoked directly, and "windows-1252" when invoked from a hyperlink in a MS Office document. I therefore inserted the following meta-tag, and pages seem to display correctly even when invoked from Office documents:

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

这篇关于MS Office超链接更改代码页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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