In order to understand why StringUtils.replace doesnt appear to be working, we need to understand which character you are trying to replace.
In this example, the special character is µ (Mu or Micro)
if you were to try and use this in StringUltils.replace:
message.setNode('/', StringUtils.replace(message, 'µ', '^'));
It likely will not succeed, because there are many hex or unicode characters that result in that symbol. You have to make sure you have the right one.
If you open the message in a hex editor (such as ultra edit or HxD), you might find that the Hex equivalent for your special character is something like B5
you can convert that Hex Code into a Unicode equivalent (http://www.fileformat.info/info/unicode/char/b5/index.htm) and use it in StringUtils.replace along with the escape character:
message.setNode('/', StringUtils.replace(message, '\u00B5', '^'));
below is a code snippet for a good way to test this process out in QIE:
//first, get a line from the sample to test with
var mshLine = message.getNode('MSH');
qie.info("before = " + mshLine);
//check if the character exists (indexOf will be greater than -1)
qie.info("index of \u00B5 = " + StringUtils.indexOf(mshLine, '\u00B5', 0));
//attempt the replace
mshLine = StringUtils.replace(mshLine, '\u00B5', '^');
qie.info("after = " + mshLine);
//check if the character exists after the replacement (indexOf should be -1)
qie.info("index of \u00B5 = " + StringUtils.indexOf(mshLine, '\u00B5', 0));