views:

262

answers:

1

Hello, I want to make a small app with Delphi to search inside files for a specific word and change it then save the file

It should support ansi and utf-8, how I should do that ?

thanks

A: 

If this is Delphi 2007 or older, you should probably use my GpTextFile unit (which also works in Delphi 2009 and 2010).

In D2009+ you can use TEncoding converters to achieve simillar effect. See these StackOverflow topics for more information:

Open an ANSI file and Save a a Unicode file using Delphi

How can a text file be converted from ANSI to UTF-8 with Delphi 7?

gabr