diff --git a/res/appstore/AppxManifest.xml b/res/appstore/AppxManifest.xml
index 11628a04..241ddfc1 100644
--- a/res/appstore/AppxManifest.xml
+++ b/res/appstore/AppxManifest.xml
@@ -8,7 +8,7 @@
for an interesting struggle, when you also happen to have a comma in one of the fields... -->
diff --git a/src/format.c b/src/format.c
index d1ce5af1..c7a180ef 100644
--- a/src/format.c
+++ b/src/format.c
@@ -676,15 +676,17 @@ static BOOL FormatDrive(DWORD DriveIndex)
BOOL r = FALSE;
PF_DECL(FormatEx);
PF_DECL(EnableVolumeCompression);
- char FSType[32], path[MAX_PATH];
+ char FSType[64], path[MAX_PATH];
char *locale, *VolumeName = NULL;
WCHAR* wVolumeName = NULL;
WCHAR wFSType[64];
WCHAR wLabel[64];
ULONG ulClusterSize;
- size_t i;
+ size_t i, index;
GetWindowTextU(hFileSystem, FSType, ARRAYSIZE(FSType));
+ // Skip the RIGHT_TO_LEFT_EMBEDDING mark from LTR languages
+ index = (strncmp(FSType, RIGHT_TO_LEFT_EMBEDDING, sizeof(RIGHT_TO_LEFT_EMBEDDING) - 1) == 0) ? (sizeof(RIGHT_TO_LEFT_EMBEDDING) - 1) : 0;
// Might have a (Default) suffix => remove it
for (i=strlen(FSType); i>2; i--) {
if (FSType[i] == '(') {
@@ -693,9 +695,9 @@ static BOOL FormatDrive(DWORD DriveIndex)
}
}
if ((fs == FS_UDF) && !((dur_mins == 0) && (dur_secs == 0))) {
- PrintInfoDebug(0, MSG_220, FSType, dur_mins, dur_secs);
+ PrintInfoDebug(0, MSG_220, &FSType[index], dur_mins, dur_secs);
} else {
- PrintInfoDebug(0, MSG_222, FSType);
+ PrintInfoDebug(0, MSG_222, &FSType[index]);
}
VolumeName = GetLogicalName(DriveIndex, TRUE, TRUE);
wVolumeName = utf8_to_wchar(VolumeName);
@@ -727,6 +729,8 @@ static BOOL FormatDrive(DWORD DriveIndex)
setlocale(LC_ALL, locale);
GetWindowTextW(hFileSystem, wFSType, ARRAYSIZE(wFSType));
+ // Again, skip the RIGHT_TO_LEFT_EMBEDDING mark if present
+ index = (wFSType[0] == 0x202b) ? 1 : 0;
// We may have a " (Default)" trail
for (i=0; i