GNU bug report logs -
#42904
[PATCH] Non-Unicode frame title crashes Emacs on macOS
Previous Next
Reported by: Mattias Engdegård <mattiase <at> acm.org>
Date: Mon, 17 Aug 2020 14:13:02 UTC
Severity: normal
Tags: patch
Merged with 41184
Found in version 28.0.50
Done: Mattias Engdegård <mattiase <at> acm.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Tue, Aug 18, 2020 at 10:07:27AM +0200, Mattias Engdegård wrote:
> 17 aug. 2020 kl. 21.56 skrev Alan Third <alan <at> idiocy.org>:
>
> > + encoded_name = code_convert_string_norecord (name, Qutf_16le, 1);
>
> Presumably this should be utf_16be on big-endian platforms. We still support PowerPC macOS, don't we?
No, however I imagine we support GNUstep on big endian systems.
> > + str = [NSString stringWithCharacters: (const unichar *) SDATA (encoded_name)
>
> Is SDATA guaranteed to be 16-bit aligned? Doesn't matter on x86 or
> PowerPC, but strictly speaking...
I've no idea, I adapted the code from make_multibyte_string in
alloc.c, and one of it's callers (although I can't remember which
right now). I'm expecting Eli to appear and tell me this is the
entirely wrong way of doing this. ;)
Anyway, as I understand it the internal representation of NS strings
are UTF-16, so the conversion through UTF-8 seems a bit of a waste if
we can go direct.
--
Alan Third
This bug report was last modified 4 years and 269 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.