Name extension bug

I’ve just noticed on my Mojave machine that if a file name has a space in its extension (eg. “My script.scpt alias”), the Finder, System Events, NSURL, and NSString all return the relevant ‘name extension’ or ‘pathExtension()’ as an empty string (“”). No problem with the full ‘name’ or ‘lastPathComponent()’.

The same’s true with the Finder on my El Capitan system, but there System Events and the Foundation methods all correctly return the extension as “scpt alias”.

Catalina returns “”. I see that Xcode doesn’t let you include a space in an extension, at least in its interface — it inserts a comma, so you end up with two extensions for the type. I’m not sure what happens if you then edit the Info.plist file directly.