This happens because file names longer than 8 characters are not supported by FAT directly, but via LFN extension. FAT is indeed case-insensitive, that's why you can't create x1234567
and X1234567
files. However, when you create files with long names, short file names are created instead, plus an LFN entry which holds the full name.
So when you create files x12345678
and X12345678
, these files are given short names like X12345~1
and X12345~2
, which are valid and different FAT names. Linux has a relaxed attitude towards checking the uniqueness of LFN entries, so you end up creating two entries which are differentiated only by case; something Windows wouldn't allow. But this is a limitation (or rather a feature) of Windows, not the FAT file system.
Sidenote: I bet you can also create a file named CON
in linux on a FAT volume.
See vfat documentation for mount options which define how linux should work with file names.