* Bug? Encoding trouble in org-id-locations-load
@ 2017-11-03 14:11 Anders Johansson
2017-11-03 21:05 ` Jorge Morais Neto
2017-11-04 21:41 ` Nicolas Goaziou
0 siblings, 2 replies; 3+ messages in thread
From: Anders Johansson @ 2017-11-03 14:11 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug? Encoding trouble in org-id-locations-load
2017-11-03 14:11 Bug? Encoding trouble in org-id-locations-load Anders Johansson
@ 2017-11-03 21:05 ` Jorge Morais Neto
2017-11-04 21:41 ` Nicolas Goaziou
1 sibling, 0 replies; 3+ messages in thread
From: Jorge Morais Neto @ 2017-11-03 21:05 UTC (permalink / raw)
To: Anders Johansson; +Cc: emacs-orgmode@gnu.org
On 3 November 2017 at 12:11, Anders Johansson <mejlaandersj@gmail.com> wrote:
> 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 ä).
This may be related to two problems I had with
~org-icalendar-combine-agenda-files~. When I invoked that command,
Emacs created some duplicates of buffers for Org files with names
containing non-ASCII Latin-1 characters. In the names of the
duplicates, each non-ASCII Latin-1 character was replaced by two octal
escape sequences (probably the character code in UTF-8).
The second problem was Emacs interrupting the export to ask me which
character encoding to use for certain "problematic characters".
Strangely, the "problematic characters" were octal escape sequences
which I verified to be correct UTF-8 codes of non-ASCII Latin-1
characters. Emacs was apparently trying to "reencode" "text" that was
actually UTF-8 code. Each time I invoked
~org-icalendar-combine-agenda-files~ and Emacs asked that, I chose raw
text encoding so the UTF-8 codes would be left as is.
I finally decided to investigate and traced both problems to some id
links pointing to headlines in files with names containing non-ASCII
Latin-1 characters. I worked around by setting Org Mode not to export
those links.
Regards
--
- I am Brazilian. I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free (as in free speech) software for Android: https://f-droid.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug? Encoding trouble in org-id-locations-load
2017-11-03 14:11 Bug? Encoding trouble in org-id-locations-load Anders Johansson
2017-11-03 21:05 ` Jorge Morais Neto
@ 2017-11-04 21:41 ` Nicolas Goaziou
1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2017-11-04 21:41 UTC (permalink / raw)
To: Anders Johansson; +Cc: emacs-orgmode@gnu.org
Hello,
Anders Johansson <mejlaandersj@gmail.com> writes:
> 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.
Agreed. I applied your suggestion. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-04 21:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-03 14:11 Bug? Encoding trouble in org-id-locations-load Anders Johansson
2017-11-03 21:05 ` Jorge Morais Neto
2017-11-04 21:41 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.