Skip to main content
Visitor II
April 9, 2025
Solved

fileX file name encoding

  • April 9, 2025
  • 2 replies
  • 462 views

Hello,

I am listing files on the SD card using fileX. My issue that some of the files contain Czech Characters (eg. č,ž,ě,š and few more). It seems that files with czech characters are read with shortened file names. (FX_MAX_LONG_NAME_LEN is set to 256). For example file "113---Kočka ze Záběhlic.dat" is read as "113---~1.DAT". File with almost the same name length "112---Dejte mu zahrát.dat" is read correctly.

So my theory is it has something to do with the character encoding.

I used to read all the names correctly with fatfs in the past however this is first time I am using FileX.
Any tips?

regards Jeronym

 

 

    This topic has been closed for replies.
    Best answer by JeronymJ

    So the issue was my confusion after using fatfs in the past and the fact I missed some api in the documentation at first.

    Api fx_directory_long_name_get i used before reads the unicode name but when there is some special character it returns short file name instead.

    I found fx_unicode_name_get api in the documentation. This returns unicode file name. Than when I need to work with the file I need to use fx_unicode_short_name_get to get the short name required to open the file.

     

     

    2 replies

    JeronymJAuthor
    Visitor II
    April 15, 2025

    No one with some experience with long file names?

    regards Jeronym

    JeronymJAuthorAnswer
    Visitor II
    April 24, 2025

    So the issue was my confusion after using fatfs in the past and the fact I missed some api in the documentation at first.

    Api fx_directory_long_name_get i used before reads the unicode name but when there is some special character it returns short file name instead.

    I found fx_unicode_name_get api in the documentation. This returns unicode file name. Than when I need to work with the file I need to use fx_unicode_short_name_get to get the short name required to open the file.