Pregunta

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

Root directory table

The entries starting with 0xE5 are deleted, so I assume these were created due to renaming. The entries for the actual files look like this:

TEST   TXT *snip*
INNIT  EH  *snip*

What I don't understand is where the entries like

At.e.s.t......t.x.t
Ai.n.n.i.t.....e.h.

are coming from and what are they for. They do not start with 0xE5, so should be treated as existing files.

By the way, I'm using Debian Linux to create filesystems and files, but I noticed similar behaviour on FS and files created on Windows.

¿Fue útil?

Solución

The ASCII parts of the name (where the letters were close to each other) is the legacy 8.3 DOS shortname. You see it only uses capital letters. In DOS, only these would be there.

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

Otros consejos

The intervening bytes are all 0x00, which gives a strong feeling that they are stored in UTF-16 instead of UTF-8. Perhaps they are there as an extension similar to the other VFAT extensions for long filenames?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top