Inconsistant treatment of precomposed and combining Unicode characters

Steps to reproduce

  1. Create a new vault named unicode_test_vault.
  2. Create a new note named using the following sequence of Unicode chars:
    • U+0064 : LATIN SMALL LETTER D (the on your keyboard)
    • U+006F : LATIN SMALL LETTER O (the on your keyboard)
    • U+0067 : LATIN SMALL LETTER G (the on your keyboard)
    • U+0304 : COMBINING MACRON (Found in a character map)
      The file is thus named doḡ.
  3. Create a new note named link and attempt to create a link to the first note using the string you typed as the name.

Expected result

The note doḡ appears in the suggestion box. Clicking on the newly created link takes you to the first note.

Actual result

The suggestion box says “no matches found”, and a broken link will be created.

Environment

SYSTEM INFO:
Obsidian version: v1.7.6
Installer version: v1.4.13
Operating system: Windows 10 Pro 10.0.19045
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

As typed, the final g + macron is a sequence of two distinct chars, however, the sequence will be collapsed into the single char U+1E21 : LATIN SMALL LETTER G WITH MACRON <ḡ> in the filename. It will not appear in the suggestion box because the filename no longer contains the substring U+0067 : LATIN SMALL LETTER G, U+0304 : COMBINING MACRON, but rather the single precomposed char U+1E21 : LATIN SMALL LETTER G WITH MACRON. Finishing the link as typed will create a broken link because the two chars are still treated as separate in the body of the note. If you click on this broken link. It will create a new note, but collapse the two chars in the filename as before. Since there’s already a note with that name, it will append a 1 to the new note to make the filename unique. Since there’s still not a filename using the g+macron substring, the link created earlier remains broken. Clicking on that broken link as many times as you care to will spawn new notes with the appended digit incremented by one each time.

If you attempt to search for your original note using the name as you typed it. It will not appear in the search results, though link will, since the body of link contains a link with the combing macron that has not been collapsed.

TL;DR

If you name a note containing a letter + combining Unicode character where a precomposed character for that sequence exists, the substring will be collapsed into that precomposed character in the filename, but not in the body of a note or in the search bar, making it impossible to link to or search for that note using its name as entered.