简体   繁体   English

UTF-8字符集

[英]UTF-8 character set

I have a form field which would allow up to 120 characters and also accept all UTF-8 unicode character set including special, numeric and Alpha to provide for i18ncharacters. 我有一个表单字段,该字段最多可以包含120个字符,并且还接受所有UTF-8 Unicode字符集,包括特殊字符,数字字符和Alpha字符,以提供i18n字符。 It should ignore leading and trailing spaces 它应该忽略前导和尾随空格

As I have mostly used limited ASCII set, I am not sure what UTF-8 would include. 由于我通常使用有限的ASCII集,因此我不确定UTF-8将包含哪些内容。

Could you please guide me about the basic differences of the ASCII/UTF-8 and the complete character set which should be allowed given the above requirement. 您能否指导我有关ASCII / UTF-8的基本区别以及在上述要求下应该允许的完整字符集。

Thank you. 谢谢。

ASCII contains only 128 characters and the latest version of Unicode contains more than 109,000 characters covering 93 scripts. ASCII仅包含128个字符,而最新版本的Unicode包含109,000个字符,涵盖93个脚本。

http://en.wikipedia.org/wiki/ASCII - the full description about ASCII http://en.wikipedia.org/wiki/ASCII-有关ASCII的完整说明

http://en.wikipedia.org/wiki/Unicode - the wiki article about Unicode http://en.wikipedia.org/wiki/Unicode-有关Unicode的Wiki文章

http://unicode.org/charts/ - list of Unicode charts http://unicode.org/charts/-Unicode图表列表

Simply, UTF-8 is a superset of US-ASCII. 简而言之,UTF-8是US-ASCII的超集。 Any character in ASCII can be represented in UTF-8, and using the same bit representations. ASCII中的任何字符都可以使用相同的位表示形式以UTF-8表示。 UTF-8 is one representation of Unicode, that allows for representation of any currently defined character. UTF-8是Unicode的一种表示形式,它允许表示任何当前定义的字符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM