As the title suggests I'm looking for a way to convert "normal" filename into a short 8.3 format. But I need to do it completely without using any external tool for that, I have to know the algorithm.
Maybe I should explain why: I'm working with a module for SD cards on Arduino, and I found that this module for some reason saves files using 8.3 format, even that the same card inserted into normal computer can have got files with normal filenames.
The problem is, that when I want to save a file with this module, I have to choose a filename that conforms to the 8.3 format, or I'll be unable to save the file. Some similar problem exists with reading a file: if I give the module a normal filename then the module won't convert it automatically to 8.3 and I won't be able to read it.
Because I'm coding for Arduino I can't use any external tool like WinAPI's GetShortPathName function. I have to know the right algorithm.