Unicode file names from MacOS are displayed incorrectly

You have encountered a problem using Far Manager? Here you can get help.
Post Reply
ragimiri
Posts: 14
Joined: Mon 01 Feb, 2010 13:10
Location: Czech Republic
Has thanked: 2 times

Unicode file names from MacOS are displayed incorrectly

Post by ragimiri » Thu 21 Mar, 2019 11:19

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?
Attachments
far.png
far.png (11.68 KiB) Viewed 3362 times
explorer.png
explorer.png (3.84 KiB) Viewed 3362 times
Last edited by HaRT on Thu 21 Mar, 2019 12:27, edited 1 time in total.
Reason: Removed Topic icon

User avatar
HaRT
Moderator
Posts: 8751
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 81 times
Been thanked: 148 times

Unicode file names from MacOS are displayed incorrectly

Post by HaRT » Thu 21 Mar, 2019 12:41

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?
Фар есть инструмент, а не нянька. © 2009 DrKnS

ragimiri
Posts: 14
Joined: Mon 01 Feb, 2010 13:10
Location: Czech Republic
Has thanked: 2 times

Unicode file names from MacOS are displayed incorrectly

Post by ragimiri » Thu 21 Mar, 2019 13:38

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

User avatar
HaRT
Moderator
Posts: 8751
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 81 times
Been thanked: 148 times

Unicode file names from MacOS are displayed incorrectly

Post by HaRT » 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…
ragimiri, you could try ConEmu for now, it might have a workaround for this.
Фар есть инструмент, а не нянька. © 2009 DrKnS

2useven10
Posts: 3835
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 4 times
Been thanked: 159 times

Unicode file names from MacOS are displayed incorrectly

Post by 2useven10 » 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)

2useven10
Posts: 3835
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 4 times
Been thanked: 159 times

Unicode file names from MacOS are displayed incorrectly

Post by 2useven10 » Thu 21 Mar, 2019 17:45

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.

2useven10
Posts: 3835
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 4 times
Been thanked: 159 times

Unicode file names from MacOS are displayed incorrectly

Post by 2useven10 » Thu 21 Mar, 2019 17:59

test.bat successfully creates 3 different files on my win10.
2 of them visually identical (different pairs in far/explorer).
Attachments
test.bat.7z
(259 Bytes) Downloaded 15 times
Last edited by 2useven10 on Thu 21 Mar, 2019 18:10, edited 1 time in total.

2useven10
Posts: 3835
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 4 times
Been thanked: 159 times

Unicode file names from MacOS are displayed incorrectly

Post by 2useven10 » Thu 21 Mar, 2019 18:37

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).
Last edited by 2useven10 on Thu 21 Mar, 2019 18:38, edited 1 time in total.

User avatar
HaRT
Moderator
Posts: 8751
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 81 times
Been thanked: 148 times

Unicode file names from MacOS are displayed incorrectly

Post by HaRT » Thu 21 Mar, 2019 18:39

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.
Фар есть инструмент, а не нянька. © 2009 DrKnS

User avatar
HaRT
Moderator
Posts: 8751
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 81 times
Been thanked: 148 times

Unicode file names from MacOS are displayed incorrectly

Post by HaRT » Thu 21 Mar, 2019 18:41

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.
Фар есть инструмент, а не нянька. © 2009 DrKnS

2useven10
Posts: 3835
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 4 times
Been thanked: 159 times

Unicode file names from MacOS are displayed incorrectly

Post by 2useven10 » Thu 21 Mar, 2019 18:48

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.

User avatar
HaRT
Moderator
Posts: 8751
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 81 times
Been thanked: 148 times

Unicode file names from MacOS are displayed incorrectly

Post by HaRT » Thu 21 Mar, 2019 18:53

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.
Фар есть инструмент, а не нянька. © 2009 DrKnS

Post Reply

Return to “Support and Troubleshooting”