store and compare file names as suggested in DSStoreFormat.pod #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From http://search.cpan.org/~wiml/Mac-Finder-DSStore/DSStoreFormat.pod:
"My guess is that the string comparison follows the same rules as HFS+
described in Apple's TN1150."
https://developer.apple.com/legacy/library/technotes/tn/tn1150.html
specifies that "Unicode strings will be stored in fully decomposed form,
with composing characters stored in canonical order" and contains a
FastUnicodeCompare routine defined as the "HFS Plus case-insensitive
string comparison algorithm"
The unorm module is used to fully decompose and canonically order
filename strings. The FastUnicodeCompare routine is implemented as
HFSPlusFastUnicodeCompare and used in Entry.sort instead of
localeCompare.
This solves LinusU/node-appdmg#33.
(At first I only added .toLowerCase() to filename strings in Entry.sort,
which solved the issue, but only in case of names containing only latin
letters without diacritics.)