Handle UTF in long filenames (#20087)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
@@ -103,5 +103,10 @@
|
||||
|
||||
#define FILENAME_LENGTH 13 // Number of UTF-16 characters per entry
|
||||
|
||||
// UTF-8 may use up to 3 bytes to represent single UTF-16 code point.
|
||||
// We discard 3-byte characters allowing only 2-bytes
|
||||
// or 1-byte if UTF_FILENAME_SUPPORT disabled.
|
||||
#define LONG_FILENAME_CHARSIZE TERN(UTF_FILENAME_SUPPORT, 2, 1)
|
||||
|
||||
// Total bytes needed to store a single long filename
|
||||
#define LONG_FILENAME_LENGTH (FILENAME_LENGTH * MAX_VFAT_ENTRIES + 1)
|
||||
#define LONG_FILENAME_LENGTH (FILENAME_LENGTH * LONG_FILENAME_CHARSIZE * MAX_VFAT_ENTRIES + 1)
|
||||
|
||||
Reference in New Issue
Block a user