I`am using +FAT version 160919_FreeRTOS_Labs
UTF-16 unicode support is enabled by setting ffconfigUNICODE_UTF16_SUPPORT to 1.
Long file names support is enabled also by setting ffconfigLFN_SUPPORT to 1.
That would let me to use filenames in unicode, i supposed.
But how can I pass a unicode string to ff_fopen() function, if its pcFile parameter have the type of const char *?
How could one open a file which filename is a unicode string?
Vladimir, I am guessing that you want to see file names in Cyrillic?
The Unicode variant of the library ( ffconfigUNICODE_UTF16_SUPPORT ) has been tested, but it was never included into the top layer: ff_stdio.c
When you use the low-level functions like FF_Open(), you do have Unicode, but you will miss the “file system layer”. Which is no problem if you just have a single volume, an SD-card.
I think I would define a type that holds a character ( of file name ) :
Just checked the above change with ff_stdio.c
I’m afraid it is a lot more work because there are lots of manipulations with the file- and directory-names. Also ff_sys.c will need to be adapted to use Unicode. No quick fix available, I’m afraid
Vladimir, I am guessing that you want to see file names in Cyrillic?
Exactly!
I was very confused realising that Unicode enabled file system actually does not support it from the top layer.
But I’am understand its still in development and unfinished.
Maybe, I should try an ANSI OEM code page for extra cyrillic symbols?
Windows 1251 suits me best.
That will let me use the existing top layer interface, with insertion of conversion function (OEM to UTF-16 and vice versa) before making calls to native UTF-16 layer.
I need ff_fopen(), ff_findfirst() and ff_findnext() only for now.
I will be appreciated for any advices.
PS: I’am very liked +FAT at the moment.
Sectors caching and consecutive clusters read (in one driver function call!) is a very nice features!