机器人.txt;什么编码? [英] robots.txt; What encoding?

查看:34
本文介绍了机器人.txt;什么编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将要创建一个 robots.txt 文件.

I am about to create a robots.txt file.

我正在使用记事本.

我应该如何保存文件?UTF8ANSI 还是什么?

How should I save the file? UTF8, ANSI or what?

另外,应该是大写的R吗?

在文件中,我指定了站点地图位置.这应该用大写 S 吗?

And in the file, I am specifying a sitemap location. Should this be with a capital S?

  User-agent: *
  Sitemap: http://www.domain.se/sitemap.xml

谢谢

推荐答案

由于文件应仅包含 ASCII 字符,因此通常将其保存为 ANSI 或 UTF-8 并不重要.

Since the file should consist of only ASCII characters, it normally doesn't matter if you save it as ANSI or UTF-8.

但是,如果有选择,你应该选择ANSI,因为当你将文件保存为UTF-8时,记事本会在文件前面添加Unicode字节顺序标记,这可能会使文件对于只知道的解释器不可读ASCII.

However, you should choose ANSI if you have a choice because when you save a file as UTF-8, notepad adds the Unicode Byte Order Mark to the front of the file, which may make the file unreadable for interpreters that only know ASCII.

这篇关于机器人.txt;什么编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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