i have a script that reads an xml file then produces some document.write javascript lines and sends them to request . I'm getting a weird character (only shows in internet explorer, not firefox). I can't seem to track it down.

我有一个脚本,读取一个xml文件,然后生成一些document.write javascript行,并将它们发送给请求。我得到一个奇怪的角色(只在Internet Explorer中显示,而不是firefox)。我似乎无法追踪它。

Here's a URL of the script being used (has weird chars in IE): http://www.voyagertravelguides.com/test.htm

这是使用的脚本的URL(在IE中有奇怪的字符):http://www.voyagertravelguides.com/test.htm

The source of the javascript tag is where the .net script is

javascript标记的来源是.net脚本的位置

Anyone know what's up? I've tried using ISO-8859-1 on both the script and in a meta tag. I've tried replacing chr(194) in the .NET script

谁知道怎么了?我已尝试在脚本和元标记中使用ISO-8859-1。我试过在.NET脚本中替换chr(194)

1 个解决方案

#1


If you use WriteAllText or WriteAllLines to create the xml file, it can introduce odd characters if you don't specify the encoding scheme.

如果使用WriteAllText或WriteAllLines创建xml文件,如果未指定编码方案,则可能会引入奇数字符。

For example, instead of

例如,而不是

   File.WriteAllText(fName, sText)

use

   File.WriteAllText(fName, sText, System.Text.Encoding.Default)

更多相关文章

  1. 包含HTML和JavaScript标记的HTML选择控件作为文本
  2. 如何在详细信息标记的结束事件上添加CSS转换?
  3. 单击内部标记时将类添加到li
  4. 如何为给定的地方放置标记
  5. 使用ng-repeat渲染条件标记
  6. 使用CSS类作为JS标记是一种不好的做法吗?
  7. 在Django模板标记库中导入外部库时出错
  8. python解压zip脚本
  9. 使用python脚本配置zabbix发送报警邮件

随机推荐

  1. Android实现朋友圈评论回复列表
  2. 编写自定义的 Android Preference 组件[
  3. 曾经的笔记——android的学习笔记(布局和
  4. android开发环境 eclipse + android sdk
  5. 上百个android小项目源码(来源于网络)
  6. Google API key申请
  7. Android界面布局详解
  8. android简单学习总结
  9. Android开机启动流程
  10. Android之HttpPost与HttpGet使用