Skip to content

Commit

Permalink
Don't mangel 8.3-filenames with chars > 0x7f
Browse files Browse the repository at this point in the history
Don't mangel 8.3-filenames with chars > 0x7f

Windows produces 8.3filenames wit chars > 0x7f. Those have been rejected
by Marlin until now.

With these 'malformed' filenames can now be worked with:
In the LCD menue
With RepetierHost (V1.6.1 tested) - full support. Characters are
displayed as '?'
With Octoprint (1.2.10 tested) the files do not appear in the files
area. At the console, listed with M20 they appear with a '�'.
With Pronterface the files appear in the sd-window but you can't start
them. They are mangled by pronterface. The names are altered and than
recected by Marlin. In the console they apper with differen but not the
correct characters.

All in all a little step forward.

Fix for #3593
  • Loading branch information
Blue-Marlin committed Apr 30, 2016
1 parent eeef571 commit ac4caab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/SdBaseFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ bool SdBaseFile::make83Name(const char* str, uint8_t* name, const char** ptr) {
uint8_t b;
while ((b = pgm_read_byte(p++))) if (b == c) goto fail;
// check size and only allow ASCII printable characters
if (i > n || c < 0X21 || c > 0X7E)goto fail;
if (i > n || c < 0X21 || c == 0X7E)goto fail;
// only upper case allowed in 8.3 names - convert lower to upper
name[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a'));
}
Expand Down

0 comments on commit ac4caab

Please sign in to comment.