greiman / SdFat

Arduino FAT16/FAT32 exFAT Library
MIT License
1.07k stars 503 forks source link

Examples of SDFat #465

Open VantagePro2 opened 8 months ago

VantagePro2 commented 8 months ago

Good evening! I am dealing with the examples of the SDFat library (version 2.2.2). When compiling the Unicode Filenames example for the Arduino Due board, I get an error:

Arduino: 1.8.19 (Windows 10), Плата:"Arduino Due (Programming Port)"

UnicodeFilenames:96:2: error: #error USE_UTF8_LONG_NAMES must be non-zero in SdFat/src/SdFatCongfig.h

error USE_UTF8_LONG_NAMES must be non-zero in SdFat/src/SdFatCongfig.h

^ exit status 1

error USE_UTF8_LONG_NAMES must be non-zero in SdFat/src/SdFatCongfig.h

What is the reason for this error? There is // #define USE_UTF8_LONG_NAMES 1 in SdFatCongfig.h

greiman commented 8 months ago

Edit SdFatConfig.h and remove the comment slashes so USE_UTF8_LONG_NAMES is define to one.

VantagePro2 commented 8 months ago

Everything works. Thank you very much. Could you explain to me why there were the comment slashes for this line?

greiman commented 8 months ago

Could you explain to me why there were the comment slashes for this line?

UTF8 require more memory and few people use UTF8 so the default is to not enable UTF8. Many Uno users can't even enable exFAT.

VantagePro2 commented 8 months ago

Now it's clear Thanks a lot