Subject: Re: bug#36940: tests slowness and failure after recent Tramp changes

From: Eli Zaretskii <[email-masked]>
Date: Sun, 25 Aug 2019 12:51:05 +0300

> From: Michael Albinus <[email-masked]>
> Date: Sun, 25 Aug 2019 11:27:26 +0200
> Cc: Paul Eggert <[email-masked]>, [email-masked]
> 
> What I see is that the string to be searched for in the tests is
> different from what the test should use. The test declares the string
> 
> "Γυρίστε το Γαλαξία με Ώτο Στοπ"
> 
> The fourth character is "ί", which is 
> 
> character: ί (displayed as ί) (codepoint 943, #o1657, #x3af)
> name: GREEK SMALL LETTER IOTA WITH TONOS
> 
> In your search, the following string is used instead
> 
> "Γυρίστε το Γαλαξία με Ώτο Στοπ"
> 
> The fourth character is replaced by the two characters "ί", which are
> 
> character: ι (displayed as ι) (codepoint 953, #o1671, #x3b9)
> name: GREEK SMALL LETTER IOTA
> 
> character: ́ (displayed as ́) (codepoint 769, #o1401, #x301)
> name: COMBINING ACUTE ACCENT
> 
> I have no idea how and why the replacement happened. Could somebody with
> UTF-8 background chime in, please? Or is it a font issue?

Darwin filesystem under utf-8-hfs uses decomposed strings for file
names.  What you see is the result of that decomposition: ί was
decomposed into ι followed by the acute accent, a combination that
displays the same as the original precomposed letter, but is different
when binary-compared.

I think you should run the strings through
ucs-normalize-HFS-NFD-string before comparing them, when the
en/decoding is done with utf-8-hfs.  Alternatively, use the facilities
in char-fold.el to generate a more lax regexp for your search in
tramp--test-check-files.