Difference between revisions of "WideChar"
From Lazarus wiki
Jump to navigationJump to search (Char = AnsiChar but someday may be Char = WideChar) |
|||
Line 1: | Line 1: | ||
− | A variable of type WideChar, also referred to as UnicodeChar, is exactly 2 bytes in size, and contains one Unicode character in UTF-16 encoding. As it is impossible to encode all Unicode code points in 2 bytes, | + | A variable of type WideChar, also referred to as UnicodeChar, is exactly 2 bytes in size, and contains one Unicode character in UTF-16 encoding. As it is impossible to encode all Unicode code points in 2 bytes, two WideChars may be needed to encode a single code point. As of version 3 of Free Pascal, the [[Char]] datatype is a synonym for an [[AnsiChar]]. However, in the future the Free Pascal compiler may consider Char a synonym for WideChar. |
Revision as of 11:47, 11 June 2016
A variable of type WideChar, also referred to as UnicodeChar, is exactly 2 bytes in size, and contains one Unicode character in UTF-16 encoding. As it is impossible to encode all Unicode code points in 2 bytes, two WideChars may be needed to encode a single code point. As of version 3 of Free Pascal, the Char datatype is a synonym for an AnsiChar. However, in the future the Free Pascal compiler may consider Char a synonym for WideChar.