linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Fedin <sonic_amiga@rambler.ru>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] Full NLS support for HFS (classic) filesystem
Date: Tue, 31 May 2005 15:35:17 -0400	[thread overview]
Message-ID: <429CBC75.2030605@rambler.ru> (raw)
In-Reply-To: <Pine.LNX.4.61.0505311156520.3728@scrub.home>

Roman Zippel wrote:

>>/dev/cdrom /mnt/cdrom iso9660,udf,hfsplus,hfs
>>user,noauto,iocharset=koi8-r,codepage=866,hfscodepage=10007 0 0
> 
> 
> Use different mount points. This is not a reason to create a lot of 
> different options all doing the same.

  Why??? It's incomfortable for the user!

>> I tried this in the beginning of my work and failed. As i can see some
>>special tricky algorythm is used in order to find a file by name which depends
>>on actual character code values (there are "<" and ">" conditions). It does
>>not use string comparison at all. This algorythm requires the filename to be
>>translated back from UNIX encoding to Mac encoding. I just can't apply another
>>algorythm like "list all names in the directory, convert every name to UNIX
>>encoding and compare", HFS simply does not behave this way.
> 
> 
> This is not HFS specific problem, you have this problem with any fs using 
> nls. fat does the comparison using the translated names, but that just 
> means it may find the wrong file instead of no file.

  Yes, it may find wrong file. But i mean here that HFS does not use 
string comparison at all for finding a file but some specific hashing (i 
tried to understand how it actually works and was unable to, too 
difficult). So it just will not find many files at all, even if names 
are translated correctly. As i say, i tried this, it completely failed.

>> Extra tables built on the fly ensure that every character in "codepage"  has
>>its own unique equivalent in "iocharset", some equivalents are "invented" by
>>marking all unmapped characters in "codepage" all unused characters in
>>"iocharset" (those to which no one of "codepage"'s characters is mapped) and
>>then maps unmapped characters to those unused characters. This works
>>perfectly. I used this approach in my first attempt which introduced koi8-r
>>only and were rejected by you several months ago.

> Again, this is not HFS-specific. Create a dynamic nls translation module 
> and use this from HFS, this code does not belong in HFS.

  This (if you mean that not all characters can be translated) is really 
not HFS-specific. But the fact that all characters MUST be 
reverse-translatable is HFS-specific.
  Don't understand about dynamic NLS module. What code should it contain?

> I would accept a translation similiar to fat, anything else has to be done 
> at the nls layer.

  Translation similar to FAT is unusable. Even files with correctly 
translated names will be not found.
  File searching at the end relies on hfs_strcmp() function which 
produces correct results only if supplied strings are in Mac encoding.
  I thought for a while and decided that dynamically created reversible 
translation table is the best and the simplest approach.
  Well, probably it's possible to rewrite hfs_strcmp() to use some 
dynamically created table. But... Again, it will be dynamically created. 
   And it requires many time of additional research but the result will 
be nearly the same.

> No, superblock info is passed as "struct superblock *".

  Ok, it's not a problem.

  P.S. I think you know the HFS implementation better than me. Why don't 
you beleive me that there is no other solution?

-- 
  Kind regards, Pavel Fedin

  reply	other threads:[~2005-05-31 11:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <429B1E35.2040905@rambler.ru>
2005-05-30 11:50 ` [PATCH] Full NLS support for HFS (classic) filesystem Roman Zippel
2005-05-31 13:37   ` Pavel Fedin
2005-05-31 10:45     ` Roman Zippel
2005-05-31 19:35       ` Pavel Fedin [this message]
2005-05-31 12:13         ` Roman Zippel
2005-05-31 21:21           ` Pavel Fedin
2005-05-31 13:59             ` Roman Zippel
2005-05-31 14:49               ` Anton Altaparmakov
2005-05-31 15:28                 ` Roman Zippel
2005-06-02 13:34                 ` Pavel Fedin
2005-06-02  9:24                   ` Anton Altaparmakov
2005-06-03 13:34                     ` Pavel Fedin
2005-06-03  8:09                       ` Anton Altaparmakov
2005-06-06 13:15                         ` Pavel Fedin
2005-06-06 12:44                           ` Roman Zippel
2005-06-06 21:44                             ` Pavel Fedin
2005-06-06 14:44                               ` Roman Zippel
2005-06-08 18:08                                 ` Pavel Fedin
2005-06-01  0:26             ` Roman Zippel
     [not found]               ` <429F0869.4010805@rambler.ru>
     [not found]                 ` <Pine.LNX.4.61.0506021130290.3728@scrub.home>
2005-06-03 14:00                   ` Pavel Fedin
2005-06-09 23:47   ` George Anzinger
2005-05-30 14:05 Pavel Fedin

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=429CBC75.2030605@rambler.ru \
    --to=sonic_amiga@rambler.ru \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=zippel@linux-m68k.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;
as well as URLs for NNTP newsgroup(s).