In a previous question (http:Q_21240266.html
) I was given the following code by Axter to perform find and replace in files.
CTSTR FileName, LPCTSTR OldStr, LPCTSTR NewStr)
if (file.Open(FileName, CFile::modeReadWrite))
int ReturnValue = Data.Replace(OldStr, NewStr);
However I have just changed my project settings to use UNICODE characters and after reading in the file, the CString 'Data' contains just squares (rubbish, in other words).
What needs to be done to change this to work when Unicode is defined ?