Handle properly non-ASCII and Xcode placeholders

NonASCII characters are sanitized to ';' before asking formatter for
replacements, so always returned byte offsets represents character ranges too.

Also Xcode placeholders are sanitized so they are not destroyed by formatter.