From ab8c36b6e2b595ee0d70c8db945a2a032658c0c7 Mon Sep 17 00:00:00 2001 From: Christopher Williams Date: Mon, 9 May 2022 17:37:44 -0700 Subject: [PATCH] R0.14b patch 2 April 4, 2022 String functions, f_puts and f_printf, cannot write the unicode characters not in BMP to the file when FF_LFN_UNICODE == 2 (UTF-8). --- source/ff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ff.c b/source/ff.c index 22a7cb9..7b3dbdc 100644 --- a/source/ff.c +++ b/source/ff.c @@ -6524,7 +6524,7 @@ static void putc_bfd (putbuff* pb, TCHAR c) if ((BYTE)c < 0x80) break; /* Single byte? */ if (((BYTE)c & 0xE0) == 0xC0) pb->ct = 1; /* 2-byte sequence? */ if (((BYTE)c & 0xF0) == 0xE0) pb->ct = 2; /* 3-byte sequence? */ - if (((BYTE)c & 0xF1) == 0xF0) pb->ct = 3; /* 4-byte sequence? */ + if (((BYTE)c & 0xF8) == 0xF0) pb->ct = 3; /* 4-byte sequence? */ return; } else { /* In the multi-byte sequence */ if (((BYTE)c & 0xC0) != 0x80) { /* Broken sequence? */