From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How to use string-to/as-unibyte correctly? Date: Tue, 21 Jun 2016 05:36:28 +0300 Message-ID: <83oa6v6zf7.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1466476707 27227 80.91.229.3 (21 Jun 2016 02:38:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jun 2016 02:38:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Liu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 21 04:38:20 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bFBZm-0002Fd-6L for ged-emacs-devel@m.gmane.org; Tue, 21 Jun 2016 04:38:06 +0200 Original-Received: from localhost ([::1]:47611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFBZh-00014n-TY for ged-emacs-devel@m.gmane.org; Mon, 20 Jun 2016 22:38:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFBZ7-00014e-Go for emacs-devel@gnu.org; Mon, 20 Jun 2016 22:37:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFBZ4-0008RO-5s for emacs-devel@gnu.org; Mon, 20 Jun 2016 22:37:25 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFBZ4-0008Qj-2b; Mon, 20 Jun 2016 22:37:22 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4084 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bFBZ2-0000NS-7i; Mon, 20 Jun 2016 22:37:20 -0400 In-reply-to: (message from Leo Liu on Tue, 21 Jun 2016 07:40:31 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204627 Archived-At: > From: Leo Liu > Date: Tue, 21 Jun 2016 07:40:31 +0800 > > As part of discussion on bug http://debbugs.gnu.org/23750, I am > wondering what is the deal with string-to/as-unibyte? How to use them > correctly or are they in their way out (obsolete)? 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.