You were on the right track but needed to add $+ on either side of the $chr. The problem then is, what if the original string contained a space on one side of the special character? Quite a few checks are required. The following alias uses a regular expression to catch the position of these escaped special characters then evaluates them with $chr
alias crcheck {
;; Store our string in %f and expression in %re
var %f = $1-, $&
%re = /(&#( $+ \d{1,3} $+ )(;))
;; While special characters in &# format remain in the string, find their positions and replace them
while ($regex(%f,%re)) %f = $+($left(%f,$calc($regml(1).pos -1)),$chr($regml(2)),$mid(%f,$calc(1+$regml(3).pos)))
return %f
}
Edit; Sorry, was still typing when KingTomato posted. Can of course be shortened to %f = $replace(%f,$regml(1),$chr($regml(2)))