内容源自Delphi XE5 UPDATE 2官方帮助《Delphi Reference》,本人水平有限,欢迎各位高人修正相关错误!
也欢迎各位加入到Delphi学习资料汉化中来,有兴趣者可QQ:[email protected]

1 The Delphi Character Set

1 Delphi字符集

The Delphi language uses the Unicode character encoding for its character set, including alphabetic and alphanumeric Unicode characters and the underscore. Delphi is not case-sensitive. The space character and control characters (U+0000 through U+001F including U+000D, the return or end-of-line character) are blanks.

Delphi语言采用Unicode字符编码作为其字符集,包括英文字母和字母数字的Unicode字符和下划线的Unicode字符编码。 Delphi是不区分大小写的。空格字符和控制字符(U +0000到U +001F包括U +000D,返回或行尾的字符)显示为空白。

The RAD Studio compiler will accept a file encoded in UCS-2 or UCS-4 if the file contains a byte order mark. The speed of compilation may be penalized by the use for formats other than UTF-8, however. All characters in a UCS-4 encoded source file must be representable in UCS-2 without surrogate pairs. UCS-2 encodings with surrogate pairs (including GB18030) are accepted only if the codepage compiler option is specified.

RAD Studio编译器将接受编码UCS-2或UCS-4的文件,如果文件中包含字节顺序标记。编译的速度可能因为使用UTF-8以外的其他格式而降低。所有UCS-4中的字符编码的源文件都必须是可表示的UCS-2代理对。如果指定语言编码编译器选项,UCS-2编码与代理对(包括GB18030)是可以接受的。

注:UCS-2就是用两个字节编码,UCS-4就是用4个字节(实际上只用了31位,最高位必须为0)编码。

04-27 20:36