mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kyle Moffett <mrmacman_g4@mac.com>
To: Patrick McFarland <pmcfarland@downeast.net>
Cc: Denis Vlasenko <vda@ilport.com.ua>,
	Alexey Zaytsev <alexey.zaytsev@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [RFC] Filesystem name storage (Was: A Great Idea (tm) about reimplementing NLS.)
Date: Wed, 15 Jun 2005 23:59:11 -0400	[thread overview]
Message-ID: <C960854D-7EA5-4DD7-8F2B-7021092CE3EB@mac.com> (raw)
In-Reply-To: <200506152155.05865.pmcfarland@downeast.net>

On Jun 15, 2005, at 21:55:04, Patrick McFarland wrote:
> On Wednesday 15 June 2005 05:13 am, Denis Vlasenko wrote:
>> I do not understand how this is going to look from userspace  
>> perspective.
>> Can you give examples how this will work?
>
> IMHO, he means that the userspace would only see Unicode filenames,  
> and the
> userspace could only give Unicode names back to the kernel. The  
> kernel, using
> this global NLS layer would translate back and forth, and the userland
> wouldn't know about it.
>
> Its basically the only sane way to approach the problem of getting  
> the entire
> Linux community to convert to Unicode.

Would the following system for filenames resolve most of the issues  
people
are raising:

First load charset tables into the kernel.  These would be stored in  
files in
userspace and could be easily updated, renamed, deleted, etc.  Such a  
table
would always be a translation from Unicode <=> Charset.  A kernel  
with this
system built in would understand natively "raw", "utf8", "utf16", and  
"utf32",
anything else would need loaded charset tables.

The following mount options would available:
   nls_raw=(0|1)  [default 1]:
     This would cause Linux to pass all chars through unmolested.   
This mode
     works well on multiuser systems where users want to use their  
own NLS
     tools, or where the whole system uses UTF-8, including the  
filesystems.
     This is backwards compatible with the way Linux currently  
presents most
     (all?) filesystems.  If the options "nls_disk" or "nls_user" are  
used,
     then this option is forced to be zero.
   nls_disk=<string-charset>
     This specifies the underlying charset which should be used on  
the disk
     or filesystem itself.  This may be "negotiate" for any filesystems
     which support NLS *and* can identify which charset is in use.   
Built in
     options are "utf8", "utf16", and "utf32".  Defaults to  
"negotiate" if
     available otherwise "utf8", but only defaults if "nls_raw" is 0.
   nls_user=<string-charset>
     This specifies the charset which should be presented to the  
user.  This
     may be used to allow a backwards compatibility (IE: A program wants
     ISO8859-1, but the admin wants the underlying filesystem to use  
UTF-8.
     Built in options are "utf8", "utf16", and "utf32".  Defaults to  
"utf8"
     if "nls_raw" is 0.

The end result is that specifying either nls_disk or nls_user will  
turn on
automatic NLS conversion, with the unspecified nls_ option being utf8.

If these options are used on bind mounts, they should override the  
underlying
filesystem's mount options (Instead of stacking).  This will allow  
the admin
to specify:

# mount -t ext3 -o nls_disk=utf8,nls_user=utf8 /dev/hdb /mnt
# mount --bind  -o nls_disk=utf8,nls_user=iso8850-1 /mnt/mail /var/ 
spool/mail

if he/she wants to provide backwards compatibility with a legacy mail
spooling program.  Note: A part of each translation table would be an
entry for "Unspecified character", such that any UTF-8 character not  
mapped
in the table could be translated to a sane default, such as '?'.  If  
names
collide under such translation, the kernel would need a way to keep  
track of
the collisions (Appended numbers?) and properly re-resolve them when  
asked.

Cheers,
Kyle Moffett

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$  
r  !y?(-)
------END GEEK CODE BLOCK------


  reply	other threads:[~2005-06-16  3:59 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-13 10:38 A Great Idea (tm) about reimplementing NLS Alexey Zaytsev
2005-06-13 10:49 ` Stefan Smietanowski
2005-06-13 18:01   ` Islam Amer
2005-06-14  9:32     ` Islam Amer
2005-06-14 10:10       ` Måns Rullgård
2005-06-14 15:28         ` Islam Amer
2005-06-13 12:05 ` Bernd Petrovitsch
2005-06-13 13:54   ` Alexey Zaytsev
2005-06-13 14:32     ` Bernd Petrovitsch
2005-06-13 17:38       ` Alexey Zaytsev
2005-06-13 18:58         ` Måns Rullgård
2005-06-14  8:04           ` Alexander E. Patrakov
2005-06-14  9:05             ` Måns Rullgård
2005-06-15  8:26               ` Lukasz Stelmach
2005-06-15  8:54                 ` Patrick McFarland
2005-06-15  9:14                   ` Lukasz Stelmach
2005-06-15  9:41                     ` Måns Rullgård
2005-06-15 14:52                       ` Lukasz Stelmach
2005-06-15 21:28                         ` Lennart Sorensen
2005-06-15 23:34                           ` Lukasz Stelmach
2005-06-16  1:44                             ` Patrick McFarland
2005-06-16 10:38                               ` Måns Rullgård
2005-06-16 11:36                               ` Bernd Eckenfels
2005-06-16 20:41                               ` Rob Sims
2005-06-16  9:40                             ` Måns Rullgård
2005-06-18 14:48                               ` Lukasz Stelmach
2005-06-18 23:22                                 ` Måns Rullgård
2005-06-22  8:41                                   ` Lukasz Stelmach
2005-06-16 13:39                             ` Lennart Sorensen
2005-06-16 14:44                               ` Richard B. Johnson
2005-06-16 15:04                                 ` Lennart Sorensen
2005-06-17  1:18                                   ` Patrick McFarland
2005-06-17  8:21                                     ` Måns Rullgård
2005-06-17  8:49                                       ` Patrick McFarland
2005-06-17  9:17                                         ` Måns Rullgård
2005-06-17  9:37                                           ` Måns Rullgård
2005-06-17  9:41                                         ` Bernd Eckenfels
2005-06-17 13:09                                         ` Lennart Sorensen
2005-06-17 13:23                                           ` Måns Rullgård
2005-06-18 16:04                                             ` Robin Rosenberg
2005-06-18 18:06                                               ` Kari Hurtta
2005-06-18 21:57                                                 ` Robin Rosenberg
2005-06-18 19:09                                               ` Bernd Eckenfels
2005-06-17 12:56                                     ` Lennart Sorensen
2005-06-18 22:30                                   ` Bernd Eckenfels
2005-06-16  1:42                           ` Patrick McFarland
2005-06-13 13:35 ` Alan Cox
2005-06-13 17:20   ` Alexey Zaytsev
2005-06-13 19:20     ` Alan Cox
2005-06-13 19:38       ` Måns Rullgård
2005-06-13 20:31       ` Rutger Nijlunsing
2005-06-15 20:50       ` Alexey Zaytsev
2005-06-16  1:52         ` Patrick McFarland
2005-06-16 10:14           ` Alexey Zaytsev
2005-06-16  1:49       ` Patrick McFarland
2005-06-16  2:36         ` Theodore Ts'o
2005-06-16  2:59           ` Patrick McFarland
2005-06-16  4:33           ` Jeremy Maitin-Shepard
2005-06-16 14:37             ` Theodore Ts'o
2005-06-19 17:55               ` Pavel Machek
2005-06-20 18:38                 ` Alan Cox
2005-06-20 22:19                   ` Pavel Machek
2005-06-20 23:38                     ` Andreas Schwab
2005-08-26  0:00                   ` Daniel B.
2005-08-26  8:34                     ` Bernd Petrovitsch
2005-08-26 14:07                     ` Alan Cox
2005-06-15  9:13 ` Denis Vlasenko
2005-06-16  1:55   ` Patrick McFarland
2005-06-16  3:59     ` Kyle Moffett [this message]
2005-06-18 15:24       ` [RFC] Filesystem name storage (Was: A Great Idea (tm) about reimplementing NLS.) Lukasz Stelmach

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=C960854D-7EA5-4DD7-8F2B-7021092CE3EB@mac.com \
    --to=mrmacman_g4@mac.com \
    --cc=alexey.zaytsev@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmcfarland@downeast.net \
    --cc=vda@ilport.com.ua \
    /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®