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: eww doesn't decode %AA%BB%CC URL names Date: Thu, 24 Dec 2015 23:00:04 +0200 Message-ID: <83io3nmujv.fsf@gnu.org> References: <83r3n0llkt.fsf@gnu.org> <87vb7nsq1g.fsf@gnus.org> <83ziwzmzyp.fsf@gnu.org> <8760znslig.fsf@gnus.org> <83twn7myin.fsf@gnu.org> <87bn9fr59a.fsf@gnus.org> <87vb7npogq.fsf@gnus.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1450990790 30817 80.91.229.3 (24 Dec 2015 20:59:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Dec 2015 20:59:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 24 21:59:46 2015 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 1aCCzB-0003U5-TA for ged-emacs-devel@m.gmane.org; Thu, 24 Dec 2015 21:59:46 +0100 Original-Received: from localhost ([::1]:33392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCCzA-00089Z-La for ged-emacs-devel@m.gmane.org; Thu, 24 Dec 2015 15:59:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCCyu-00089I-Or for emacs-devel@gnu.org; Thu, 24 Dec 2015 15:59:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCCyp-0003LU-PH for emacs-devel@gnu.org; Thu, 24 Dec 2015 15:59:28 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCCyp-0003LQ-MW; Thu, 24 Dec 2015 15:59:23 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3248 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aCCyp-0007FX-3O; Thu, 24 Dec 2015 15:59:23 -0500 In-reply-to: <87vb7npogq.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 24 Dec 2015 21:43:17 +0100) 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.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196801 Archived-At: > From: Lars Ingebrigtsen > Date: Thu, 24 Dec 2015 21:43:17 +0100 > > If I eval the following: > > (write-region (point) (point-max) "/home/larsi/Downloads/妊快把忱扯快") > > Then I get a file name that consists of five spaces. That seems awfully > weird. I may have configured something somewhere that says that Emacs > should create file names in latin-1... Hm... > > (set-language-environment "Latin-1") > > Which I would guess isn't uncommon. I hope not. Those who do that completely screw up their file-name encoding stuff. > Making an all-blank file name here is somewhat unacceptable, I > think. So how should this be handled? Not sure which problem are you trying to solve. But my crystal ball says you need to (let ((file-name-coding-system default-file)) (write-region (point) (point-max) "/home/larsi/Downloads/妊快把忱扯快")) because most GNU/Linux systems use UTF-8 codeset by default.