我需要将机器名称存储在数据库字段中,因此我需要知道该字段的大小。
那么机器名的长度有没有限制呢?
如果是这样,限制是多少?
我的机器名可以是 Unicode 吗?
最佳答案
这篇知识库文章说 FQDN 有 255 个字节,它确实支持 Unicode。
http://support.microsoft.com/kb/909264
DNS domain names
The maximum length of the host name and of the fully qualified domain name (FQDN) is 63 octets per label and 255 bytes per FQDN. This maximum includes 254 bytes for the FQDN and one byte for the ending dot.
In Windows 2000 and in Windows Server 2003, the maximum host name and the FQDN use the standard length limitations that are mentioned earlier, with the addition of UTF-8 (Unicode) support. Because some UTF-8 characters exceed one octet in length, you cannot determine the size by counting the characters.
关于windows - window server 中机器名的限制是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4097282/