misc/165140: mount_msdosfs -W koi2dos cannot read file No.

Thor Ablestar thor at irk.ru
Wed Feb 15 11:50:10 UTC 2012

The following reply was made to PR misc/165140; it has been noted by GNATS.

From: Thor Ablestar <thor at irk.ru>
To: Andriy Gapon <avg at FreeBSD.org>
Cc: bug-followup at FreeBSD.org
Subject: Re: misc/165140: mount_msdosfs -W koi2dos cannot read file No.
Date: Wed, 15 Feb 2012 20:19:27 +0900

 On 02/15/12 18:58, Andriy Gapon wrote:
 > â„– symbol is not in KOI8-R.
 > If you need to be able to nicely handle such symbols, then you have to use an
 > appropriate character encoding in your localization (UTF-8, Windows-1251).
 > We _could_ add a hack for this symbol, but where do we stop?  Tomorrow someone
 > would request a hack for «», then something else.
 > So I don't think that this is a way to go.
 > Please try to handle this issue via local configuration.
 Problem is that I have tried UTF-8, too. And the result is the same:
 # mount_msdosfs -L UTF-8 /dev/da0s1 /flop
 mount_msdosfs: UTF-8: No error: 0
 (didn't mount. Why? FAT-32 uses UTF, it should be transparent!)
 # mount_msdosfs -L ru_RU.UTF-8 /dev/da0s1 /flop
 # umount /flop
 (Did mount but file is still "Cannot stat" and not accessible)
 I've tried 1251 according to your advice. With some imagination, it may 
 be named "It Works".
 # mount_msdosfs -L ru_RU.CP1251 /dev/da0s1 /flop
 # umount /flop
 (Did mount OK and all files are accessible but names are of course 
 garbage-like. I need something special to find a file. Midnight 
 Commander, for instance)
 # mount_msdosfs -L ru_RU.CP866 /dev/da0s1 /flop
 # umount /flop
 (Same as 1251)
 CP-1251 is NOT the common encoding in Russian *nix world. KOI and UTF 
 are, and UTF is a perspective encoding while 1251 is not perspective 
 even under Windows (They also transition to UTF). Use of it will break 
 compatibility, and I agree to suffer compatibility loss due to UTF 
 transfer, but not 1251 transfer. CP866 is even older and it's life cycle 
 ended 17 years ago.
 So I strongly believe it would be necessary either to provide a 
 _correct_ name translation to UTF or allow user to load an arbitrary 
 translation table. Or both.  Neither works for now. Or at least tell me 
 where the translation tables lie. And option "transparent" will be nice 
 for emergency, too.
 But at least an ugly method to extract a single valuable file (or dump 
 and restore a FAT-32 volume not looking inside) has been found. Thanks.

More information about the freebsd-bugs mailing list