From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Chaos Eternal Newsgroups: gmane.lisp.guile.user Subject: Re: guile can't find a chinese named file Date: Sun, 27 Nov 2016 12:16:55 +0000 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1480249055 19623 195.159.176.226 (27 Nov 2016 12:17:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 27 Nov 2016 12:17:35 +0000 (UTC) To: Thomas Morley , guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Nov 27 13:17:30 2016 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cAyOe-0003kv-7C for guile-user@m.gmane.org; Sun, 27 Nov 2016 13:17:28 +0100 Original-Received: from localhost ([::1]:53917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAyOh-0005fW-Ku for guile-user@m.gmane.org; Sun, 27 Nov 2016 07:17:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAyOK-0005fQ-6g for guile-user@gnu.org; Sun, 27 Nov 2016 07:17:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAyOJ-0000va-2F for guile-user@gnu.org; Sun, 27 Nov 2016 07:17:08 -0500 Original-Received: from mail-qk0-x230.google.com ([2607:f8b0:400d:c09::230]:34211) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cAyOI-0000vR-Rp for guile-user@gnu.org; Sun, 27 Nov 2016 07:17:06 -0500 Original-Received: by mail-qk0-x230.google.com with SMTP id q130so115682679qke.1 for ; Sun, 27 Nov 2016 04:17:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shlug-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=+lBv/WveyuJCd04XyevtIwcxLvfr+k7fH13HZfP0/h0=; b=zuOgYnpboB9mlxUg+oGHpwIFrr2EtkIIN6xAN4EFb9ivC1WK6nCwT2Ryogt1v7cERp r5ZMDzgWsV7RcafDN0iuDGu9NrKz4JmIq8/OhReo5IJ4GUtSJbTm4pdSKFFk+eVOdt3o t1yBg2xIHWF/po1ziWwupF7YudcfK2FKUm2wc+X+VFvTimoN4NDD+42fXa2vCeEpzfkW VyvxvoSL/TrCsLlth+V51527qmVU49xSqo4ZrNGHwSdagfs0v/wAn2p2c3vHyu0tWuEE kz2JUs6vi/jXssawUIch//bsp0Z2kfHtZXZTZ4l9Bb5vVIhUkCGbxgM/rDUP5gR/SiqF bz7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=+lBv/WveyuJCd04XyevtIwcxLvfr+k7fH13HZfP0/h0=; b=PykWL+ryQmuzvfbEbCz1mYi2eKCKiOfyaDCIJk2X3fMsot55EUm1fbn2Rbzugph0x4 ALzbUfKIzOa9B8nXBy4PMWTFJ0afhdLg4CWs3BuB37DwfwXTWeM14YFNmOdx9aidvPrf flNYo4BKsX5OBeug1pLaCFu4xQ1W5xAHxhky125q+rqv6FY9FN+bVwV98b6hUs6HWF81 n7zJtyGa4qZm78JsuufzFUhcLAkg8FUw0mcM70sPdX34fHfWWpJT0hXupI3WhVwQuYtP mU7IpfWX/tXtaCyq4s4XZcHXe2a/0DqV6OF0hibyOtBWDmub23exZZqouCO6ISfaPHnd zX2Q== X-Gm-Message-State: AKaTC03Rciy/8qbkU6azmqi62QwyP7oCor2zUt9SCDtzxnRSLyRu0Ju02oglsd6DO1+AURANklnX/yOYsmu3ig== X-Received: by 10.55.200.149 with SMTP id t21mr14450530qkl.214.1480249026031; Sun, 27 Nov 2016 04:17:06 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::230 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13009 Archived-At: Seems that UTF-8 encoded string has been converted to unicode before calling `open', but on filesystem the filename is utf8 string On Sun, Nov 27, 2016 at 7:58 PM Thomas Morley wrote: > Hi all, > > a chinese user came up with a weird problem. > > He wants to process the string retrieved by (command-line) further, in > his file-name he used some chinese characters. > I tracked it down to the attached minimal example. > With guile-2.0.13 I get: > > guile filename_=E5=90=8D=E5=AD=97.scm > ;;; Stat of /home/hermann/Desktop/filename_??.scm failed: > ;;; ERROR: In procedure stat: No such file or directory: > "/home/hermann/Desktop/filename_\u540d\u5b57.scm" > Backtrace: > In ice-9/boot-9.scm: > 160: 8 [catch #t # ...] > In unknown file: > ?: 7 [apply-smob/1 #] > In ice-9/boot-9.scm: > 66: 6 [call-with-prompt prompt0 ...] > In ice-9/eval.scm: > 432: 5 [eval # #] > In ice-9/boot-9.scm: > 2404: 4 [save-module-excursion # ice-9/boot-9.scm:4051:3 ()>] > 4058: 3 [#] > 1727: 2 [%start-stack load-stack ...] > 1732: 1 [#] > In unknown file: > ?: 0 [primitive-load "/home/hermann/Desktop/filename_\u540d\u5b57.scm"= ] > > ERROR: In procedure primitive-load: > ERROR: In procedure open-file: No such file or directory: > "/home/hermann/Desktop/filename_\u540d\u5b57.scm" > > What to do to make it work? > I messed around setting locales, to no avail so far. > > Btw, the same with guile-1.8: > guile-1.8 filename_=E5=90=8D=E5=AD=97.scm > > ("filename_=EF=BF=BD\x90\x8d=E5=AD=97.scm") > (filename_=E5=90=8D=E5=AD=97.scm) > > The string is strange, but at least the file is found. > > Cheers, > Harm >