views:

257

answers:

2

Delphi 2009 sets the default file format for new source code files to ANSI, this makes the source code platform-dependent.

Even for a new XSD file created in the IDE, which by default starts with this line

<?xml version="1.0" encoding="UTF-8" ?>

Delphi sets the file format to ANSI (this looks like a bug, for new XML and XSLT documents UTF8 is selected by default).

Is there a hidden option to set the default file format for source code files?

+1  A: 

Right-click on your source code in the Delphi 2009 IDE, and select File Format. Then choose UTF-8. Hope that helps.

Rohit Agarwal
I think the question was about doing that by default, so a new file starts off being set to UTF8.
David M
This does not change the default file format for new files to UTF8, it has an effect only for the current file.
mjustin
A: 

AFAIK, there is no IDE-wide setting for specifying the default file format.

Remy Lebeau - TeamB