From 6ef398024362084fb7649059366adb9afc805aed Mon Sep 17 00:00:00 2001 From: Matthias Blankertz Date: Sat, 20 Dec 2025 21:24:38 +0100 Subject: [PATCH] oofatfs: Set API encoding to UTF-8 Since micropython uses a utf-8 string encoding, the FAT long file names (represented as UCS-2 on disk) should be encoded as UTF-8 on the API. This fixes the problem that files on VFAT that have umlauts in their file names are not shown correctly on the micropython side. Signed-off-by: Matthias Blankertz --- lib/oofatfs/ffconf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oofatfs/ffconf.h b/lib/oofatfs/ffconf.h index 4a8015668..6287f7d98 100644 --- a/lib/oofatfs/ffconf.h +++ b/lib/oofatfs/ffconf.h @@ -164,7 +164,7 @@ / ff_memfree() in ffsystem.c, need to be added to the project. */ -#define FF_LFN_UNICODE 0 +#define FF_LFN_UNICODE 2 /* This option switches the character encoding on the API when LFN is enabled. / / 0: ANSI/OEM in current CP (TCHAR = char)