English 中文(简体)
是否统法协会将“超文本”和“XML”的缺省性定性分类?
原标题:Is Unicode the default Character Set of HTML & XML?
最佳回答

I suppose that you could call Unicode "the default" because both HTML and XML define their allowed content in terms of Unicode.

然而,档案可以是“统法协会编码”,它必须在一定程度上编码统法协会编码。 否则,XML的档案必须存放在UTF-8或UTF-16编码系统中,除非该目录有不同的具体规定。 紫外线光谱明确使所支持的编码不明确,并指出编码由运输议定书处理(例如,吉大港湾)。

问题回答

Depends on the person editing the document, not so much on the editor. The editor uses the encoding best suited to the author (or what they believe to be best suited to the author) as the default.

基本上,如果你没有具体说明编码,或者如果客户软件不承认服务器发送的头盔,则可能/可能出现不统一编码的情况。 我认为,其中任何一项是强制性的,只是成为一种常见的行为。

If I read your question correctly, you need to make a distinction between

  • the character set you have used
  • the character set you have declared

The character set you have actually used when you created the document is the one you have set in your editor. Now you need to make sure that consumers of your file will read it correctly, ie that the character set you have used is also the one you declare.

If you don t use a declaration, the default will be UTF-8 for XML documents, as you have said. That s what an application which reads your file will assume. So you better make sure your editor is set to UTF-8, or else use the appropriate XML header, e.g.

<?xml version="1.0" encoding="ISO-8859-1"?>

For HTML documents, the default encoding is usually set in the server config, so check that out. UTF-8 is the most common choice these days.

重要的是要区分可能出现在超文本文件中的一套特性(这是一个相当抽象的概念)和特性(encoding。 用于储存/转让超文本文档。

后者的违约取决于OS/Browser/超文本编辑,当然是而不是Unicode,因为Unicode不是编码。 它可以是“UTF-8”,它是统法协会编码的特征编码,例如“UTF-16”(这些编码不同于“ISO-8859-1”,不能编码统法协会的所有编码。

Overall, it s important, that you set your editor to the same encoding which you declare in your HTML file. Some editors do this automatically, but many do not.





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签