From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anders Johansson Subject: Bug? Encoding trouble in org-id-locations-load Date: Fri, 03 Nov 2017 15:11:38 +0100 Message-ID: <87po8z5u5h.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAchJ-0007d1-Dc for emacs-orgmode@gnu.org; Fri, 03 Nov 2017 10:11:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAchE-0001lU-Cj for emacs-orgmode@gnu.org; Fri, 03 Nov 2017 10:11:49 -0400 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:45807) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eAchE-0001jo-5w for emacs-orgmode@gnu.org; Fri, 03 Nov 2017 10:11:44 -0400 Received: by mail-wm0-x233.google.com with SMTP id y80so1809278wmd.0 for ; Fri, 03 Nov 2017 07:11:43 -0700 (PDT) Received: from ajjb (w189130.eduroam.gu.se. [130.241.189.130]) by smtp.gmail.com with ESMTPSA id y40sm5726474ede.0.2017.11.03.07.11.40 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Nov 2017 07:11:40 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "emacs-orgmode@gnu.org" Hi, I use org-id and got some surprising reports of duplicate IDs. It seems that the issue is that one of my files containing IDs has a filename consisting of some non-ascii characters (a Swedish ä). When this filename is read in from ~org-id-locations-file~ in ~org-id-locations-load~ the ä is interpreted as “\303\244”. But ~org-id-files~ and ~org-id-locations~ is also populated from currently open files, so I usually get that file represented twice as two different files in ~org-id-files~. So I get both “j-allmänt.org” and j-allm\303\244nt.org“. Both seem to be scanned correctly by ~org-id-update-id-locations~ and this results in duplicate IDs. I tried changing the call to ~insert-file-contents-literally~ in ~org-id-locations-load~ to just ~insert-file-contents~ and this seemed to fix the behaviour (as correct decoding is done then?). I don’t know if there are other unwanted effects from using ~insert-file-contents~, but otherwise this seems to me to be a more correct solution. Cheers, Anders Johansson