diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2020-08-18 12:58:12 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2020-08-20 19:39:14 +0200 |
commit | bf60338d6dd02b4d848229878c8e14182f6f861f (patch) | |
tree | bbeb8e4a96460f3da3b8bc44fee10a3dc3be70c8 /lisp/image-mode.el | |
parent | 3b8a6ef18543cc56ed4524ac3d6a6843e818f6fb (diff) | |
download | emacs-bf60338d6dd02b4d848229878c8e14182f6f861f.tar.gz emacs-bf60338d6dd02b4d848229878c8e14182f6f861f.tar.bz2 emacs-bf60338d6dd02b4d848229878c8e14182f6f861f.zip |
Fix NS crash on invalid frame title string (bug#42904)
Instead of blindly assuming that all Emacs strings are valid UTF-8,
which they are not, use a more careful conversion going via UTF-16
which is what NSString uses internally. Unpaired surrogates will
still go through to the NSString objects, but the NS libs handle them
gracefully.
* src/nsterm.h (EmacsString): New category.
* src/nsfns.m (all_nonzero_ascii): New helper function.
([NSString stringWithLispString:]): New method.
(ns_set_name_internal): Use new conversion method.
Diffstat (limited to 'lisp/image-mode.el')
0 files changed, 0 insertions, 0 deletions