info-mtools
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [mtools] Accessing Japanese Windows 98 disk


From: Marco Franzen
Subject: Re: [mtools] Accessing Japanese Windows 98 disk
Date: Sun, 20 Apr 2003 12:32:36 +0100

Hi,

I hope you can read my previous reply.  I used a Japanese character
set to show what the characters look like.  Mozilla displays it
correctly in the list archive, without the need for any locale.  But
it does need some fonts, of course, so if there should be any trouble,
I can re-send it differently.

> I would imagine the short names are using some 8-bit DOS-style kludge for 
> Japanese characters, so we may have to worry about *2* different ways of 
> mapping characters.

The manual page for mount confirms that.  It seems the mount option
codepage=932 is for the short names, whereas the long names are stored
in Unicode, and the iocharset option allows mapping that to something
else.

There is some more information in
        http://www.suse.de/~mfabian/suse-cjk/mounting-vfat.html

Note there are (at least) two common coding systems for Japanese, both
supported by glibc locales, ja_JP.EUC-JP and ja_JP.UTF-8.  They would
be the choice of the Unix user, not of the mounted file system.

Mounting is more complicated to use than mtools need be, since it
fixes the conversion at mount time (maybe unnecessarily).  That
conversion is then correct only for those processes whose locale's
character set matches that of the conversion.  (Maybe it would be
better if it fixed only one end of the conversion at mount time, but
then it would need to get the other end on each access from userland.)

Mtools could do a better job more easily than mount here by consulting
the (single) process's locale.

> It may be practical to fix this, if you have the time to help us out a
> bit.  For one thing, we probably need to find some references on the
> character mappings we should support,

Experimentation shows that mounting with an iocharset option leads to
an attempt to load kernel module
/lib/modules/<kernel-version>/fs/nls_<iocharset-name>.o .

Maybe these kernel modules help here?

> and it may be helpful if you can take binary snapshots of some disks
> with Japanese characters on them, bzip2 them, and email them to us.
> As well as perhaps explaining how they look on Windows.

I hope my other reply helps on that.  I assumed mainly the coding in
the file names was of interest here, less so that of the file
contents.

The encoding of the little file created by Notepad is recognised by
Emacs as japanese-iso-8bit (whatever that means).  I would believe
that is unchanged by mount (which should treat all files as binary, I
would hope).  But maybe for full support, mtype should map the
contents too?  (That may or may not be a *third* mapping then!)

> Given that VFAT kernel support can do "iocharset=euc-jp,codepage=932", I 
> expect we can just borrow the necessary code.

That would be great.

Cheers,
Marco
_______________________________________________
mtools mailing list
address@hidden
http://www.tux.org/mailman/listinfo/mtools


reply via email to

[Prev in Thread] Current Thread [Next in Thread]