什么是< meta charset =" utf-8"&gt ;? [英] what is <meta charset="utf-8">?

查看:178
本文介绍了什么是< meta charset =" utf-8"&gt ;?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始学习HTML(没有编码背景),不知道这是什么意思。我通常在我开始编写代码后写它,但不知道它的意思。我也不知道doctype的含义。如果我不使用它会发生什么?

解决方案

您在屏幕上阅读的字符现在每个都有一个数字值。例如,在ASCII格式中,字母'A'是65,'B'是66,依此类推。如果您查看ASCII中提供的字符表,您会发现它没有多大用处对于希望用普通话,阿拉伯语或日语写东西的人来说。对于要显示的这些语言的字符/单词,我们需要另一个系统来将它们编码到存储在计算机存储器中的号码中。

UTF-8只是其中一种编码为实现这一要求而发明的方法。它可以让你用各种语言编写文本,所以法语的口音就会显得非常好,就像这样的文字一样。 b


Бзиазбаша zbaşa),Фэсапщы,Ç'kemi,ሰላም,甚至是从右到左
的书写,例如这个السلامعليكم

如果您将上述文本复制并粘贴到记事本中,然后尝试将文件另存为ANSI(另一种格式),则会收到一条警告,即以此格式保存会失去某些格式。接受它,然后重新加载文本文件,你会看到像这样的东西


????? ????? (Bzia zbasa),Ç'kemi,???,甚至从右到左
这样的写作?????? ?????



I just started learning HTML (no coding background) and don't know what this means. I generally write it when I start the code after but have no idea what it means. I also do not know what doctype means. What will happen if I don't use it?

解决方案

The characters you are reading on your screen now each have a numerical value. In the ASCII format, for example, the letter 'A' is 65, 'B' is 66, and so on. If you look at a table of characters available in ASCII you will see that it isn't much use for someone who wishes to write something in Mandarin, Arabic, or Japanese. For characters / words from those languages to be displayed we needed another system of encoding them to and from numbers stored in computer memory.

UTF-8 is just one of the encoding methods that were invented to implement this requirement. It lets you write text in all kinds of languages, so French accents will appear perfectly fine, as will text like this

Бзиа збаша (Bzia zbaşa), Фэсапщы, Ç'kemi, ሰላም, and even right-to-left writing such as this السلام عليكم

If you copy and paste the above text into notepad and then try to save the file as ANSI (another format) you will receive a warning that saving in this format will lose some of the formatting. Accept it, then re-load the text file and you'll see something like this

???? ????? (Bzia zbasa), ???????, Ç'kemi, ???, and even right-to-left writing such as this ?????? ?????

这篇关于什么是< meta charset =" utf-8"&gt ;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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