如何处理 web.config 中的非英文字符? [英] How to handle Non English Characters in web.config?

查看:25
本文介绍了如何处理 web.config 中的非英文字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 web.config 文件中存储了一些非英文字符.我能够在记事本中保存、关闭和重新打开文件,一切看起来都很好.

I have some non English characters being stored in my web.config file. I am able to save, close and reopen the file in notepad and everything looks good.

当我尝试运行该应用程序时,出现此错误:配置文件不是格式正确的 XML.

When I try run the app, I get this error: Configuration file is not well-formed XML.

如何在 web.config 中存储非英文字符?

How can I store non English characters in web.config?

推荐答案

是否添加了普通的 XML 编码头?

Did you add the normal XML encoding header?

<?xml version="1.0" encoding="UTF-16"?>

此外,您还需要以适当的格式保存文件.

Also, you will need to save your file in the appropriate format.

这篇关于如何处理 web.config 中的非英文字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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