13.10.2011 16:30, Felipe Monteiro de Carvalho wrote:
On Thu, Oct 13, 2011 at 10:26 AM, Paul Ishenin<i...@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.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to