瀏覽代碼

Don't mangel 8.3-filenames with chars > 0x7f

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
Blue-Marlin 8 年之前
父節點
當前提交
ac4caab8f1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      Marlin/SdBaseFile.cpp

+ 1
- 1
Marlin/SdBaseFile.cpp 查看文件

@@ -405,7 +405,7 @@ bool SdBaseFile::make83Name(const char* str, uint8_t* name, const char** ptr) {
405 405
       uint8_t b;
406 406
       while ((b = pgm_read_byte(p++))) if (b == c) goto fail;
407 407
       // check size and only allow ASCII printable characters
408
-      if (i > n || c < 0X21 || c > 0X7E)goto fail;
408
+      if (i > n || c < 0X21 || c == 0X7E)goto fail;
409 409
       // only upper case allowed in 8.3 names - convert lower to upper
410 410
       name[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a'));
411 411
     }

Loading…
取消
儲存