LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	agalakhov@ifmlrs.uran.ru, Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: [PATCH] Sanitize filesystem NLS handling
Date: Mon, 19 Mar 2007 20:04:09 +0500	[thread overview]
Message-ID: <45FEA669.1060301@ums.usu.ru> (raw)
In-Reply-To: <878xdtux71.fsf@duaron.myhome.or.jp>

OGAWA Hirofumi wrote:

> No, the utf8 support of vfat is wrong. This is implementation
> thing, and it is not recommended until it is fixed.

Could you please explain your specific problem with screenshots, preferrably 
by running my LiveCD or Debian Etch in an emulator such as qemu or VMware?

But, anyway, this is a separate issue that my patch doesn't attempt to 
correct. The conclusion so far is that we disagree, and that there are 
situations where using utf8 iocharset is the least of all evils, so the 
warning is not justified enough. Reproducible testcase:

1) Install MS Windows 2000 or XP (English aka Pan-European version is just fine)
2) When the installer asks about locale settings, choose that you (a) want 
to have Cyrillic group of languages, (b) that your locale/location is 
Russia, (c) use Russian as a language for non-Unicode programs, and (d) add 
Russian keyboard layout in addition to the existing English layout if the 
system doesn't do this for you.
3) Using Windows, create a file on a floppy or flash drive. Press F2 to 
rename it. Press Alt+Shift to switch to Russian keyboard layout. Type a new 
file name. Remember (or copy to paper) what the letters that make the file 
name look like in Windows.
4) Boot my LiveCD and choose "Russian (UTF-8)" from the locale dialog (this 
matches the setup found in all modern distros such as Fedora). On the second 
screen, confirm the default settings. (Alternatively, install Debian Etch 
and select Russian during installation).
5) Try to mount the floppy or flash drive to /mnt using various iocharsets. 
List the directory contents with "ls -l". You will find that utf8 is the 
only iocharset that gives the correct letters.

OTOH, if you select Russian (KOI8-R) or Russian (CP1251), you will find that 
the only iocharset giving the correct letters will be koi8-r or cp1251, 
respectively.

> I'm talking about two filesystems on a system here, not two encoding
> on one filesystem.

I am also talking about this. Mounting two filesystems with different 
iocharsets is insane, because this will result in one of the following outcomes:

1) "ls" will show wrong characters in filenames on one of the filesystems
2) one of the two filesystems will contain wrong on-disk data for filenames, 
that, when misinterpreted by mounting with wrong iocharset, results in 
seemingly-correct output, but is misunderstood by the properly set up 
reference implementation (that's what is likely to happen with jfs in your 
example).

Testcase for (2), to be performed with my LiveCD:

1) Boot the CD, select "Russian (KOI8-R)" from the locale dialog. Agree with 
the default settings on the second screen.
2) Mount an empty floppy or flash drive with the (wrong) "cp1251" iocharset.
3) Using the right Ctrl key to switch between between English and Russian 
keyboard layouts, create a file with Russian letters in its name under /mnt.
4) umount /mnt
5) Install Windows 2000 or XP with Russian-specific settings, as described 
above.
6) Look what Windows finds on the floppy or flash. It is not the same 
filename you typed, but a sort of garbage (mojibake).

-- 
Alexander E. Patrakov

  reply	other threads:[~2007-03-19 15:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-18 16:55 Alexander E. Patrakov
2007-03-18 22:01 ` OGAWA Hirofumi
2007-03-19  2:58   ` Alexander E. Patrakov
2007-03-19  3:46     ` OGAWA Hirofumi
2007-03-19  4:38       ` Alexander E. Patrakov
2007-03-19  5:38         ` OGAWA Hirofumi
2007-03-19  5:49           ` Alexander E. Patrakov
2007-03-19 14:25             ` OGAWA Hirofumi
2007-03-19 15:04               ` Alexander E. Patrakov [this message]
2007-03-19 17:26                 ` OGAWA Hirofumi
2007-03-20  6:25                   ` Alexander E. Patrakov
2007-03-21 16:50                     ` OGAWA Hirofumi
2007-03-19 15:10               ` Alexander E. Patrakov
2007-03-19 17:36                 ` OGAWA Hirofumi
2007-03-19  6:38     ` yes --help (was: [PATCH] Sanitize filesystem NLS handling) Bernd Eckenfels
2007-03-19  8:14       ` Alexander E. Patrakov
2007-03-22 12:59 ` [PATCH] Sanitize filesystem NLS handling Roman Zippel
2007-03-22 13:22   ` Alexander E. Patrakov
2007-03-22 13:49     ` Roman Zippel
2007-03-22 13:59       ` Alexander E. Patrakov
2007-03-22 15:45         ` Roman Zippel
2007-03-22 14:58       ` Alexander E. Patrakov
2007-03-22 16:07 ` Alexander E. Patrakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45FEA669.1060301@ums.usu.ru \
    --to=patrakov@ums.usu.ru \
    --cc=agalakhov@ifmlrs.uran.ru \
    --cc=akpm@osdl.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] Sanitize filesystem NLS handling' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).