Replace non-UTF-8 characters with placeholder