Page 1 of 1

Unicode file names from MacOS are displayed incorrectly

Posted: Thu 21 Mar, 2019 11:19
by ragimiri
Hello, we use Windows servers and workstations in Czech language. We also allow users to use VPN. One colleague uses Macintosh. When she save file e. g. Školní řád.docx, it's transformed into Sˇkolni´ rˇa´d.docx (see attached screenshot). Problem is visible only in FAR, Windows Explorer is fine with that. Is there anything I can set in FAR to see these file names correctly?

Unicode file names from MacOS are displayed incorrectly

Posted: Thu 21 Mar, 2019 12:41
by HaRT
ragimiri wrote:
Thu 21 Mar, 2019 11:19
Is there anything I can set in FAR to see these file names correctly?
Very unlikely. It's a known macOS—Windows interoperability issue with Unicode normalization.
What does “cmd /c dir” output in that directory?

Unicode file names from MacOS are displayed incorrectly

Posted: Thu 21 Mar, 2019 13:38
by ragimiri
The same error:
  1. 18.08.2018  10:54            78 896 RAD_Sˇkolni´ rˇa´d.docx
  2. 18.08.2018  10:54           247 581 RAD_Sˇkolni´ rˇa´d.pdf

Unicode file names from MacOS are displayed incorrectly

Posted: Thu 21 Mar, 2019 13:53
by HaRT
I wonder if FAR can/should perform Unicode normalization prior to any output of file names, like Explorer does…
ragimiri, you could try ConEmu for now, it might have a workaround for this.

Unicode file names from MacOS are displayed incorrectly

Posted: Thu 21 Mar, 2019 17:36
by 2useven10
Even normaliz.dll:NormalizeString can't combine that names.
Name contains:
Caron (U+02C7) should be Combining Caron (U+030C)
Acute Accent (U+00B4) should be Combining Acute Accent (U+0301)

Unicode file names from MacOS are displayed incorrectly

Posted: Thu 21 Mar, 2019 17:45
by 2useven10
HaRT wrote:
Thu 21 Mar, 2019 13:53
I wonder if FAR can/should perform Unicode normalization prior to any output of file names, like Explorer does…
And lost original (not normalized) name after that.
As I can understand MacOS always decomposes filenames unlike Windows.

Unicode file names from MacOS are displayed incorrectly

Posted: Thu 21 Mar, 2019 17:59
by 2useven10
test.bat successfully creates 3 different files on my win10.
2 of them visually identical (different pairs in far/explorer).

Unicode file names from MacOS are displayed incorrectly

Posted: Thu 21 Mar, 2019 18:37
by 2useven10
ragimiri, If explorer shows names identically your names should be correctly decomposed.
Probably wrong names is just console bug.
Some days ago I did macros for automate normalized renaming in far (similar problem was with decomposed russian й).
You can copy macros NormalRen.lua to %FARPROFILE%\Macros\scripts\
To start renaming press CtrlShiftN (problem file should be under cursor).

Unicode file names from MacOS are displayed incorrectly

Posted: Thu 21 Mar, 2019 18:39
by HaRT
2useven10 wrote:
Thu 21 Mar, 2019 17:45
And lost original (not normalized) name after that.
No, I mean normalization for display purposes only (like e.g. character case changes in panel modes). All file operations would be performed using the original file name.

Unicode file names from MacOS are displayed incorrectly

Posted: Thu 21 Mar, 2019 18:41
by HaRT
2useven10 wrote:
Thu 21 Mar, 2019 17:36
Even normaliz.dll:NormalizeString can't combine that names.
Name contains:
Caron (U+02C7) should be Combining Caron (U+030C)
Acute Accent (U+00B4) should be Combining Acute Accent (U+0301)
I suspect it's how console changes the combining accent characters to display them. The original ones were surely combining.

Unicode file names from MacOS are displayed incorrectly

Posted: Thu 21 Mar, 2019 18:48
by 2useven10
HaRT wrote:
Thu 21 Mar, 2019 18:39
No, I mean normalization for display purposes onl
I think it is possible to provide filename display mode switching like Ctrl+N toggles short/full name mode.

Unicode file names from MacOS are displayed incorrectly

Posted: Thu 21 Mar, 2019 18:53
by HaRT
2useven10 wrote:
Thu 21 Mar, 2019 18:48
filename display mode switching like Ctrl+N toggles short/full name mode
I'd prefer it to be encapsulated by Panel Mode settings for it to be more flexible and more persistent.