[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use the Unicode replacement character for replacing unencodable char
From: |
Mattias Engdegård |
Subject: |
Re: Use the Unicode replacement character for replacing unencodable characters into UTF-16 |
Date: |
Tue, 18 Aug 2020 19:07:41 +0200 |
18 aug. 2020 kl. 18.19 skrev Eli Zaretskii <eliz@gnu.org>:
> Can you describe under which circumstances this default-character will
> be used?
It's what encoding into UTF-16 uses for characters that don't have a Unicode
equivalent, such as raw bytes.
Now:
(encode-coding-string "X\377Y" 'utf-16be)
=> "X Y" (in UTF-16-BE)
With the patch:
(encode-coding-string "X\377Y" 'utf-16be)
=> "X\ufffdY" (in UTF-16-BE)
> The issue that bothers me is whether u+FFFD can appear in situations
> where it cannot be displayed by Emacs, because then the result will be
> more confusing than helping.
Do you mean that on balance, all things considered, you prefer space as
replacement character to U+FFFD?