[fpc-devel] bug report 20473: Please add a directive to define string=utf8string
Paul Ishenin
webpirat at mail.ru
Thu Oct 13 15:02:19 CEST 2011
13.10.2011 16:30, Felipe Monteiro de Carvalho wrote:
> On Thu, Oct 13, 2011 at 10:26 AM, Paul Ishenin<ip at kmiac.ru> wrote:
>> It will affect as well as compiler directive you suggested to add.
> No, the directive is per source code file. 3rd party libraries do not
> need to use it.
Then use {$codepage UTF8} only. This directive treats all ansistring
constants in UTF8 codepage. So the next code:
{$codepage UTF8}
var
s: ansistring;
begin
s := 'utf8 string';
WriteLn(StringCodePage(s));
end.
will output CP_UTF8 constant.
Best regards,
Paul Ishenin.
More information about the fpc-devel
mailing list