[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obsolete string-to-multibyte hard to replace

From: Stefan Monnier
Subject: Re: Obsolete string-to-multibyte hard to replace
Date: Tue, 30 May 2017 00:03:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>> I think it'd make sense to change make-string so it always returns
>> a multibyte string, and maybe to also introduce a new make-unibyte-string.
> How about an optional argument to make-string instead?

You mean (make-string N CHAR &optional UNIBYTE) so it returns
multibyte by default (for all chars) unless the new optional arg is provided?
Sounds fine, yes.

> Anyway, beware of the use case of building and starting Emacs in a
> non-ASCII directory, especially when the locale's codeset is not
> UTF-8.  If we make such changes, these use cases must be audited to
> see that they still work, because we use unibyte strings during early
> stages of startup in these cases, until we figure out how to decode
> them.

The likelihood that those code-paths use make-string is fairly low, but
of course, it can't be ruled out.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]