Replace characters undefined in target encoding with empty strings