mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
Send proper substitution character to Android IMEs
* src/androidterm.c (android_text_to_string): Substitute REPLACEMENT CHARACTER for NULL in converting characters not representable without surrogate pairs to UTF-16.
This commit is contained in:
parent
1079d333ab
commit
25452986cb
@ -5230,11 +5230,11 @@ android_text_to_string (JNIEnv *env, char *buffer, ptrdiff_t n,
|
||||
surrogate pairs.
|
||||
|
||||
The hack used by Emacs is to simply replace each multibyte
|
||||
character that doesn't fit in a jchar with the NULL
|
||||
character. */
|
||||
character that doesn't fit in a jchar with the Unicode
|
||||
replacement character. */
|
||||
|
||||
if (encoded >= 65536)
|
||||
encoded = 0;
|
||||
encoded = 0xfffd;
|
||||
|
||||
utf16[index++] = encoded;
|
||||
buffer += BYTES_BY_CHAR_HEAD (*buffer);
|
||||
|
Loading…
Reference in New Issue
Block a user