Delphi – ny tools/utility to convert “string” to “AnsiString” in pascal source files


Delphi 2009 and above support unicode. I have few legacy pascal source files that I wish to make it compile in Delphi 2009/2010 as well as Delphi 2007 and below.

A quick and safe way is replace

  • String to AnsiString
  • PChar to PAnsiChar
  • Char to AnsiChar

Is there any utility available that able to parse .pas file and make such replacement?

Best Solution

There is a tool for pointing out areas that might need attention:

It doesn't convert it automatically, grep would do that but as mghie said it's not that simple.