Adding ansi function to substitutions.
Fix bug where file encoding was using system default, which might be ascii.