Hacker News new | ask | show | jobs
by ttepasse 984 days ago
Unfun normalisation fact: You can’t have a file named "ss" and a file named "ß" in the same folder in Mac OS.
4 comments

There are people with the surname "Con" and it's impossible to create a file with that name in MS Windows.

https://learn.microsoft.com/en-us/windows/win32/fileio/namin...

That's less a normal form issue and more a case-insensitivity issue. You also can't have a file named "a" and one named "A" in the same folder.
That would be true if the test strings were "SS" and "ß", because although "ẞ" is a valid capitalization of "ß", it's officially a newcomer. It's more of a hybrid issue: it appears that APFS uses uppercasing for case-insensitive comparison, and also uppercases "ß" to "SS", not "ẞ". This is the default casing, Unicode also defines a "tailored casing" which doesn't have this property.

So it isn't per se normalization, but it's not not normalization either. In any case (heh) it's a weird thing that probably shouldn't happen. Worth noting that APFS doesn't normalize file names, but normalization happens higher up in the toolchain, this has made some things better and others worse.

That would only explain why "ß" and "ẞ" can't both be files in the same folder. "ß" and "ss" are different letter just like "u" and "ue" for example.
This shows up in other places, too. One of my Slacks has a textji of `groß`, because I enjoy making our German speakers' teeth grind, but you sure can just type `:gross:` to get it.
> a textji

This is a weird formation; "ji" means text. It's half of the half of "emoji" that means text: 絵文字, 絵 [e, "picture"] 文字 [moji, "character", from 文 "text" + 字 "character"].

https://satwcomic.com/half-human-half-scandinavian

It's weird, but it's also how language evolves sometimes. Once used in a certain way, words or parts of words take on that meaning.

For example, there's an apartment and office building complex on a site near a historic canal and dam. The building development was named after this site. Then in one of the apartments (CORRECTION: offices), a scandalous political event happened. The complex was called Watergate, the scandal was called Watergate too, and now the suffix -gate is used for scandals.

> Then in one of the apartments, a scandalous political event happened.

It was one of the offices, not one of the apartments (specifically, it was series of break-ins to and the wiretapping of the headquarters of the Democratic National Committee by people working for President Nixon’s re-election committee.)

Oops! I double-checked that detail, made a mental note to say it was an office, and then typed apartment anyway.
Yes, but "reactji" is also weird and yet people use it for Slack reactions. It's fine.
So what happens if someone puts those two in a git repo and a Mac user checks out the folder?

  git clone https://github.com/ghurley/encodingtest
  Cloning into 'encodingtest'...
  remote: Enumerating objects: 9, done.
  remote: Counting objects: 100% (9/9), done.
  remote: Compressing objects: 100% (5/5), done.
  remote: Total 9 (delta 1), reused 0 (delta 0), pack-reused 0
  Receiving objects: 100% (9/9), done.
  Resolving deltas: 100% (1/1), done.
  warning: the following paths have collided (e.g. case-sensitive paths
  on a case-insensitive filesystem) and only one from the same
  colliding group is in the working tree:

  'ss'
  'ß'
I have this issue on occasion with older mixed C/C++ codebases that use `.c` for C files and `.C` for C++ files. Maddening.
I never understood the popularity of the '.C' extension for C++ files. I have my own preference (.cpp), but it's essentially arbitrary compared to most other common alternatives (.cxx, .c++). The '.C' extension is the only one that just seems worse (this case sensitivity issue, and just general confusion given how similar '.c' looks to '.C').

But even more than that, I just don't get how C++ turns into 'C' at all. It seems actively misleading.

C++

is Incremented C

which is Big C

which is Capital C

But C is already capital C! Even .d would have been a better extension.
You can always reformat as APFS (Case Sensitive)
I remember seeing quite a few things in the old days that would have both 'makefile' and 'Makefile'.
EEXIST