From: Andrey Borzenkov <arvidjaar@mail.ru>
To: Eduard Bloch <edi@gmx.de>, linux-kernel@vger.kernel.org
Subject: Re: confusion and case problems: utf8 <-> iocharset
Date: Thu, 13 Jul 2006 20:25:14 +0400 [thread overview]
Message-ID: <20060713162515.465575472A6@chen.mtu.ru> (raw)
In-Reply-To: <20060713075617.GA9429@rotes76.wohnheim.uni-kl.de>
Eduard Bloch wrote:
> Hello (to whom it may concern),
>
> I try to understand how the charset mapping with VFAT/Joliet and I found
> some inconsistencies between the user expectations, the docs, and the
> actuall behaviour.
>
> Users view:
>
> VFAT, NTFS and Joliet use a Unicode charset for storing the names
> internaly.
Nope. VFAT is using short name as long as it complies with MSDOS; this name
is stored in codepage character set.
[...]
>
> Second:
> there is the "utf8" option. How does that exactly differ from
> iocharset=utf8? There is not clear explanation in vfat.txt. What happens
> if you use both options, especially if iocharset!=utf8? Which one is
> prefered?
>
You actually need both; utf8 just says it is OK not to try to mangle names;
it does not substitute iocharset option.
> Third:
> how can I disable all that funny letter case conversions? They are not
> described anywhere properly,
man mount
> nor the way to disable them.
man mount
> IMO there are
> two problems:
>
> - what you write to the FS is not the same what "ls" shows you later.
> Eg. ABW becomes "abw" but "ABWÖ" becomes "ABWÖ". Abcd becomes "Abcd"
> but "ABC" becomes "abc". Does it make sense? NO.
tell this to Microsoft. It is how VFAT works. Although umlaut should
probably be considered as MSDOS-safe, at least with proper codepage option.
> I would like to stop the kernel playing such games, I had enough of
> such trouble back in my Windows 98 times.
>
> - this case conversion can actually break things. When iocharset=utf-8
> and utf8 are used, then you cannot access the data with the same
> name after storing it.
>
mount shortname=mixed is probably what you want.
> zombie:/tmp# mkdir test/TEST
> zombie:/tmp# ls test
> test
> zombie:/tmp# ls test/test
> zombie:/tmp# ls test/TEST
> ls: test/TEST: No such file or directory
{pts/1}% sudo mount -t vfat -o
loop,shortname=mixed,utf8,uid=bor /var/tmp/test.dos /tmp/x
{pts/1}% LC_ALL=C ll /tmp/x/test
total 2
drwxr-xr-x 2 bor root 2048 Jul 13 20:06 TEST/
{pts/1}% LC_ALL=C ll /tmp/x/test/TEST
total 0
-rwxr-xr-x 1 bor root 0 Jul 13 20:06 ?*
-rwxr-xr-x 1 bor root 0 Jul 13 20:06 ?*
-rwxr-xr-x 1 bor root 0 Jul 13 20:06 ?*
-rwxr-xr-x 1 bor root 0 Jul 13 20:06 ?*
The filesystem is foobared already because it contains both capital and
lowercase versions of the same names. This is what happens when you try to
use wrong codepage.
-andrey
next prev parent reply other threads:[~2006-07-13 16:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-13 7:56 Eduard Bloch
2006-07-13 16:25 ` Andrey Borzenkov [this message]
2006-07-13 18:39 ` OGAWA Hirofumi
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=20060713162515.465575472A6@chen.mtu.ru \
--to=arvidjaar@mail.ru \
--cc=edi@gmx.de \
--cc=linux-kernel@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®