Send a file named 오삐한테-예전.txt from macOS to Windows via LocalSend. What arrives is a filename of decomposed jamo: individual consonants and vowels floating apart instead of composed syllables. The file opens fine. The name is unreadable.
Why macOS sends broken Korean
macOS (HFS+ and APFS) stores filenames in Unicode NFD, the decomposed form. The Korean syllable 오 (U+C624) becomes three separate codepoints: ㅇ (U+110B) + ㅗ (U+1169). On macOS this renders correctly because the OS recomposes on display. Windows doesn't. It renders each codepoint individually, so you see scattered jamo.
This isn't a Korean-only problem. Latin accented characters hit the same thing: résumé.txt sent from macOS can arrive as résumé.txt with combining diacritics on Windows, though most Windows fonts handle Latin combining marks well enough that users don't notice. Korean is where it's visible.
Where the fix goes
LocalSend's Rust core has a sanitize_with() function in packages/core/src/util/filename.rs. Every file save routes through it: direct transfers, folder transfers, gallery-cache saves, SAF paths. One choke point. That's where NFC normalization belongs.
I added unicode-normalization = "0.1" to the Rust crate (mature dependency, 100M+ downloads on crates.io) and a single .nfc().collect::<String>() call at the top of sanitize_with(). The is_valid() function now rejects non-NFC names too, so the invariant between validation and sanitization holds.
use unicode_normalization::UnicodeNormalization; let name: String = name.nfc().collect(); 157 additions, 10 deletions. Most of that is tests and an integration test in v2_server.rs. The core logic change is two lines.
The dependency question
Adding a crate to a 10K-star project isn't free. I considered doing NFC normalization by hand, but Unicode normalization tables are 30K+ entries and the edge cases around Hangul Jamo composition are well-documented traps. unicode-normalization is the standard Rust answer. It's what rustc itself uses internally. I called this out in the PR and the maintainers agreed.
What NFC means here
NFC (Canonical Decomposition followed by Canonical Composition) is the W3C recommendation. It's what Windows, Linux, and most web systems expect. macOS is the outlier. Normalizing on receive at the file-save boundary is the correct place: you want the filename the recipient sees to match what the sender typed, regardless of which OS is doing the rendering.
I tested with cargo test (19 tests, 0 failures) but the manual macOS-to-Windows transfer I couldn't do myself. I don't have a Windows machine on my desk. The PR has a manual test plan checkbox for it; someone on the LocalSend team verified before merge.

