I'm trying to update one of my scripts to use the Unicode version of Inno Setup. Unfortunately I'm running into a problem where StringChangeEx is expecting to see a unicode String instead of the AnsiString that I need (mismatched type). Is there an alternate way to replace matching AnsiString from Unicode Inno Setup?
I'm using WizardDirValue() to avoid having to type ExpandConstant('{app}\') all the time, in case anyone wonders why.
var
  AnsiData: AnsiString;
begin
  LoadStringFromFile(WizardDirValue() + '\legacyansi.conf', AnsiData)
  // Type mismatch, StringChangeEx expects String which is Unicode
  StringChangeEx(AnsiData, 'current', 'replace', True);
  SaveStringToFile(WizardDirValue() + '\legacyansi.conf', AnsiData)
end;
 
     
    