9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: dexen deVries <dexen.devries@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] ext2srv understands only 7bit ASCII file names?
Date: Thu, 13 Oct 2011 13:37:43 +0200	[thread overview]
Message-ID: <201110131337.48830.dexen.devries@gmail.com> (raw)
In-Reply-To: <CAEaiYYwJXaF6JApbYXg5nGBuy2ArDBCbgPYW9cmNu176n4f1qQ@mail.gmail.com>

On Thursday 13 of October 2011 13:15:57 slash wrote:
> I have some files on an external ext2 drive that have whitespace and
> umlauts (ä, ö) in them. trfs took care of the whitespace. But ext2srv
> presents umlauts as a question mark symbol (�) and won't let me access
> the file (error: file does not exist).

i believe -- but i am not sure! -- that linux stores and reads names on 
ext2/3/4 without any conversion between filesystem and I/O syscalls like 
open(). if you have iso8859-1 or similar single-byte locale on linux, your 
ext2 contains iso8859-1 encoded filenames.

to the contrary, for thos filesystems that always store file names in UTF-16 or 
similar (NTFS, FAT32 with LFN, Jolliet extension of ISO9660 etc.), there's 
`iocharset' mount option that converts between on-disk UTF-16 and I/O syscalls 
like open(). normally you set it to match your locale settings. but for 
ext2/3/4, anything goes literally, literally.

you'd need to convert the pathnames, either one-time on disk or upon every r/o 
access (yuck!).

it may be sensible to use only UTF8 locale on linux, like LANG=en_US.utf8, but 
that'll not update names stored in ext2/3/4 filesystem automagically. it's just 
about interpretation.

again, that's what i believe, but i dunno how to verify that. any ideas?

-- 
dexen deVries

[[[↓][→]]]

http://xkcd.com/732/



  reply	other threads:[~2011-10-13 11:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 11:15 slash
2011-10-13 11:37 ` dexen deVries [this message]
2011-10-13 13:20   ` erik quanstrom
2011-10-13 14:28     ` slash
2011-10-13 15:20       ` Russ Cox
2011-10-13 15:25         ` slash.9fans
2011-10-13 15:30           ` erik quanstrom
2011-10-16 13:19             ` slash
2011-10-13 13:22 ` Russ Cox

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=201110131337.48830.dexen.devries@gmail.com \
    --to=dexen.devries@gmail.com \
    --cc=9fans@9fans.net \
    /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).