[fpc-devel] String handling in trunk (was utf8 in 2.6.0)
Martin Schreiber
mse00000 at gmail.com
Sat Jan 5 12:53:09 CET 2013
On Saturday 05 January 2013 12:28:03 Jonas Maebe wrote:
> Alternatively, in both cases you can instead define a
> unicodestring/widestring constant instead of an ansistring/shortstring
> constant by embedding widechar constants in the character sequence. Such
> widechar constants are of the form #<number> with <number> a valid Pascal
> representation of an integer constant between 255 and 65535. Then you can
> use those widechars to represent the desired characters as UTF-16 code
> points. In that case, the entire string will however be parsed as a
> sequence of UTF-16 code points (because a string is either a sequence of
> ansichars, or a sequence of widechars; it can never be a mixture of the
> two), and hence also #1 or #128 appearing in a widestring will be parsed as
> widechar(#1) and widechar(#128) as opposed to being interpreted according
> to the current codepage setting.
>
So compiled with -Fcutf8
"
unicodestringvar:= 'Best'#228'tigung';
"
produces a different result on fixes_2_6 and trunk? I assume in trunk there
will be a compile error? We use this form of character constants in MSEgui to
have the sources in pure ASCII.
Martin
More information about the fpc-devel
mailing list