[Top][All Lists]

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

Re: How to use string-to/as-unibyte correctly?

From: Leo Liu
Subject: Re: How to use string-to/as-unibyte correctly?
Date: Wed, 22 Jun 2016 11:33:19 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (OS X 10.11.5)

On 2016-06-20 20:56 -0400, Stefan Monnier wrote:
[snipped 4 lines]
> The correct way to use them is to not use them and use
> encode/decode-coding-string instead.
>         Stefan

On 2016-06-21 05:36 +0300, Eli Zaretskii wrote:
[snipped 7 lines]
> Don't use them, period.  They are remnants from the era long gone,
> before Emacs used Unicode and UTF-8 as the basis for its internal
> representation of characters.  Nowadays the only place where such
> conversions are sometimes needed are on the C level, deep within Emacs
> internals.  Applications should never use them.
> I'm okay with declaring them obsolete, if it helps.

I had two cases of string-to-unibyte to mean I am expecting unibyte
string and will complain if given something else.

Looks like we'd better start the process of phasing out these functions
so that nobody will make the mistake of using them.


reply via email to

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