Strange entries in the FAT file system

So, I'm trying to figure out how FAT FS works and got confused in the root directory. I have two files in the section: test.txt and innit.eh, which leads to the following table:

Root directory table

Entries starting with 0xE5 are deleted, so I assume they were created due to renaming. The entries for the actual files are as follows:

TEST TXT *snip* INNIT EH *snip* 

I don’t understand where records like

 At.est.....txt Ai.nnit....eh 

come and why they are needed. They do not start with 0xE5, so they should be considered as existing files.

By the way, I use Debian Linux to create file systems and files, but I noticed similar behavior in FS and files created in Windows.

+4
source share
2 answers

Parts of the ASCII name (where the letters were close to each other) are the old 8.3 DOS shortname. You see that it uses only capital letters. In DOS, only they will be there.

The longer parts (with 0x00 in between) is the long name (shown on Windows), which is Unicode, and uses 16 bits per character.

+3
source

Intermediate bytes are all 0x00 , which gives a strong feeling that they are stored in UTF-16 instead of UTF-8 . Perhaps they exist as an extension similar to other VFAT extensions for long file names?

+1
source

Source: https://habr.com/ru/post/1381476/


All Articles