From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Liu Newsgroups: gmane.emacs.devel Subject: How to use string-to/as-unibyte correctly? Date: Tue, 21 Jun 2016 07:40:31 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466466481 10347 80.91.229.3 (20 Jun 2016 23:48:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2016 23:48:01 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 21 01:47:49 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 1bF8ux-0001VR-74 for ged-emacs-devel@m.gmane.org; Tue, 21 Jun 2016 01:47:47 +0200 Original-Received: from localhost ([::1]:47133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF8uw-0006si-GU for ged-emacs-devel@m.gmane.org; Mon, 20 Jun 2016 19:47:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF8on-0008N9-32 for emacs-devel@gnu.org; Mon, 20 Jun 2016 19:41:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF8oh-0002tS-8O for emacs-devel@gnu.org; Mon, 20 Jun 2016 19:41:24 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:35740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF8oh-0002tL-1V for emacs-devel@gnu.org; Mon, 20 Jun 2016 19:41:19 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bF8oP-00036T-Db for emacs-devel@gnu.org; Tue, 21 Jun 2016 01:41:01 +0200 Original-Received: from 221.222.144.185 ([221.222.144.185]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Jun 2016 01:41:01 +0200 Original-Received: from sdl.web by 221.222.144.185 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Jun 2016 01:41:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 221.222.144.185 Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAMFBMVEUaFRZLMy1dTENxVzKQ WiCrXQ97cmO/dSqSh3akjGTApXy5sJ7Sxo/Sz8Xo6eP9//xJbkruAAAAAWJLR0QAiAUdSAAAAAlw SFlzAAACxQAAAsUBidZ/7wAAAAd0SU1FB9cBBwMJOwHXewoAAAIBSURBVCjPVdNBiNNAFADQ6J4F x3hThHZBBC+WCFI8SS0iezRDcMHLHkLAg6gJH/fgYQ9xYlj2sLK4KHgqCgXFhda2Idmr4kkQPZQ0 nkQMbTypbMmMM2m7ZgYSmMef/5OZPwo7HFnx3uKPcmj0Dht1LWZJ+Hvr7dIFZXRUwl9VRTuuKDJ+ U44gjscknK4hhJaCkYRsWjmBtLqXlJAG2wipNe18OZJu1BBq1E8xafl4s6Jq2mUZGftU1y7CCxnp FVUDWJXx4C66BKBnErbuoaYNtoRTu6EZBsCbMn7W+5qOAR6WvxNOby9jHWC9hAf3n304CdiAByXs 3Nh9roLDkyb/sWV712vYwaLSAn8CPMHIAAzOPDKP2COAFm4Y4ODVWc6xG7KXsN7UeUJjjimx2uwd gCgNhr0i8C/xyCD5CiCKAMY3Bf5oDzx//w/fimscdcAZU2jv9sedx6+nYPPFIoWI/GK6QZ+EFGOR ErAjCnV3vPZ7XqlTIMbOLY7fLcvvmT7rXNWaGDexIY44N12TG2PDp7vqyl57dnCeuWwyNpnEURxk fTbDYeBnKRn4oejPYI4sH6WviBumEZ/GxX4X/x6EcURFZ7E071bjQGAxpcOAEOJuTiroDEea5Szv rVWLYfl7ZiQwSUToxrkux7OLixAWGz22+HIyWTRYcVfomOwvzusfjtVIGgLHf3MAAAAASUVORK5C YII= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (OS X 10.11.5) Cancel-Lock: sha1:8e7YVOzaSLATb4iTNQNRTbPZyao= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:204621 Archived-At: Hi List, 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)? Thanks. ,----[ Eli Zaretskii ] | neither string-to-unibyte not string-as-unibyte should ever be used in | applications, their use is more often than not a sign of some basic | misunderstanding of text encoding. `---- ,----[ Eli Zaretskii ] | Bottom line: like I said, there should be no reason to use | string-*-unibyte in modern Emacs code on the url-http level or higher | (maybe not at all). Its use is a sign of some basic misunderstanding, | or a bug elsewhere, or remnant of old problems that no longer exist. | So I think we should reconsider the solution on master as well. `---- Leo