"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Marcus Sundman wrote:
> > Are path-names text or raw data in zfs? I.e., is it possible to know
> > what the name of a file/dir/whatever is, or do I have to make more
> > or less wild guesses what encoding is used where?
> 
> I'm not sure what you are asking here.  When a zfs file system is 
> mounted, it looks like a normal unix file system, i.e., a tree of
> files where intermediate nodes are directories and leaf nodes may be
> directories or regular files.  In other words, ls gives you the same 
> kind of output you would expect on any unix file system.  As to
> whether a file/directory name is text or binary, that depends
> on the name used when creating the file/directory.  As far as the 
> meta-data used to maintain the file system tree, most of this is
> compressed.  But your question makes me wonder if you have tried
> zfs. If so, then I really am not sure what you are asking.  If not,
> maybe you should try it out...

I am running it (in nexenta).
Anyway, my question was whether path-names (files, dirs, links, sockets,
etc) are text or raw data.
Fundamentals:
"raw data" is "a list of bits, usually in groups of 8 (i.e., bytes)",
and
"text" is "raw data + some way of knowing how to convert that data into
characters, forming strings". 

Example: When you go to a web-page the webserver sends the bytes of the
page along with a http-header named "Content-Type", which tells your
browser how to interpret those bytes.

Example: Some versioning systems, such as svn, are hardcoded to encode
pathnames as UTF-8. So, although the encoding-metadata isn't available
along with the data it is in the specification.

So, once more, is it possible to know the pathnames (as text) on zfs,
or are pathnames just raw data and I (or my programs) have to make more
or less wild guesses about what encoding the user who created the
file/dir/etc. used for its name?

At least on linux it's the latter. IMO it really sucks to not be able
to know the names of files/dirs/etc., because it always leads to
problems. E.g., most (but not all) programs assume filenames should be
encoded according to the current locale (let's say utf-8), so when a
filename with another encoding (let's say iso-8859-15) is encountered
various Evil(tm) things happen, such as not displaying the file(s) at
all (e.g., an image viewer I've used), or replacing filenames with "?",
or replacing parts of filenames with "?" and decoding the rest of the
filename with an obviously incorrect encoding (e.g., ls). I've even
seen programs crash when they can't decode a filename.


- Marcus
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to