On 07 Jan 2014, at 15:54, Jy V wrote:

> n Tue, Jan 7, 2014 at 12:57 PM, Jonas Maebe <jonas.ma...@elis.ugent.be>wrote:
> 
>> For this reason I've created an overview that explains the rules that are
>> followed by the RTL/compiler at
>> http://wiki.freepascal.org/FPC_Unicode_support
> 
> "it is best to save the source code in UTF-8 with a BOM."

This is the full quote: "it is best to include either an explicit {$codepage 
xxx} directive or save the source code in UTF-8 with a BOM" (which I've now 
clarified a bit on the wiki page). Both are equally good as far as FPC is 
concerned.

> Is this recommendation is compatible with Delphi7, Delphi 2007 ?

Delphi doesn't know the {$codepage xxx} directive, but you can put it between 
{$ifdef fpc}. I don't know whether it automatically detects UTF-8-encoded files 
(or even handles them at all), especially these older versions. If it doesn't, 
you can still save your source code in any code page and add a {$codepage xxx} 
statement for FPC. Additionally, I forgot to mention that you can also specify 
the used code page on the command line with FPC, via the -Fc parameter.


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to