Understanding Surrogate Pairs: Why Some Windows Filenames Can't Be Read
1–10 of 65 posts
Re: Understanding Surrogate Pairs: Why Some Windows Filenames Can't Be Read
#2Re: Understanding Surrogate Pairs: Why Some Windows Filenames Can't Be Read
#3Re: Understanding Surrogate Pairs: Why Some Windows Filenames Can't Be Read
#4Re: Understanding Surrogate Pairs: Why Some Windows Filenames Can't Be Read
#5Re: Understanding Surrogate Pairs: Why Some Windows Filenames Can't Be Read
#6I think it's hilarious that the event viewer XML gets borked.
https://learn.microsoft.com/en-us/previous-versions/windows/...
Re: Understanding Surrogate Pairs: Why Some Windows Filenames Can't Be Read
#7Or otherwise said: Surrogate Pairs are used in UTF-16 (which uses two bytes per character, so it can encode up to 65536 characters) to encode Unicode characters that have code points that can't be encoded using just two bytes.
Re: Understanding Surrogate Pairs: Why Some Windows Filenames Can't Be Read
#8Ext4 filename has maximal length 255 characters. That is the only legacy limit you have to deal with as a Linux user. And even that can be avoided by using more modern filesystems.
And we get filesystem level snapshots etc...
Re: Understanding Surrogate Pairs: Why Some Windows Filenames Can't Be Read
#9Or otherwise said: Surrogate Pairs are used in UTF-16 (which uses two bytes per character, so it can encode up to 65536 characters) to encode Unicode characters that have code points that can't be encoded using just two bytes.
Yep. The quirk here is that the surrogates, that are merely enablers for other characters, can be paired with each other. With the absence of other valid characters, they are not enabling anything. One assumes there is a validation but it does not exist here.
Re: Understanding Surrogate Pairs: Why Some Windows Filenames Can't Be Read
#10Yet another reason to use Linux everywhere. It is 2025 and Windows (and probably Mac) users have to deal with weird Unicode filesystem issues. Good luck puting Chinese characters or emoticons into filenames. Ext4 filename has maximal length 255 characters. That is the only legacy limit you have to deal with as a Linux user. And even that can be avoided by using more modern filesystems. And we get filesystem level sna…