ReplInFiles does not open the files and determine their format. That's why it is so fast and you can replace a text in hundreds of files within a few seconds.
That also means that your files are either all real Unicode files (UTF-16 LE) or all real ASCII/ANSI files. UTF-8 files and ASCII escaped Unicode files are not supported directly because ReplInFiles does not determine the format of the files and convert the final replace strings to the format required by the current file. You know that you can also contain parts of a found string in the replace string when using a regular expression.
Parameter Unicode must be used when all files are UTF-16 LE (BE never tested!). For all other type of files (ASCII, ANSI, UTF-8, ASCII Escaped Unicode) you must have in the clipboard the bytes in ASCII/ANSI as the format of the files need it. Therefore all files must have the same file format or you will create corrupt files with a ReplInFiles command.
For your specific UTF-8 Replace In Files you have to do following:
- Open an existing UTF-8 file or create a new one (in UTF-8) and paste the text with special characters into it.
- Save this UTF-8 file and close it.
- Open Configuration - File Handling - Unicode/UTF-8 Detection and disable Auto detect UTF-8 files.
- Open again the just saved and closed UTF-8 file (recent file list) which is opened now as ASCII/ANSI file.
- Select the block just pasted into the file before which contains now the special characters displayed with their UTF-8 codes.
- Copy this block into the clipboard.
- Run the Replace In Files without the parameter Unicode on your UTF-8 files and they will have the correct encoding for the special characters.
- Open again Configuration - File Handling - Unicode/UTF-8 Detection and enable Auto detect UTF-8 files.
- Close the UTF-8 file opened as ASCII/ANSI file and re-open it or delete it.
Last when your replace strings contains line ending characters make sure that all your files where you want to replace something have the same type of line endings. With Replace In Files it is very easy to insert by mistake DOS line endings into a UNIX file and vice versa when not being very careful.
BTW: The text files with the strings which should be copied into the XML files have hopefully a significant mark like an UTF-8 BOM or an UTF-8 HTML/XML document declaration which allows UltraEdit to detect those txt files as UTF-8 as also the XML files and the HTML files.