9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] ext2srv understands only 7bit ASCII file names?
Date: Thu, 13 Oct 2011 11:30:56 -0400	[thread overview]
Message-ID: <2fea5b8834e93aa22dabcd313e61c066@brasstown.quanstro.net> (raw)
In-Reply-To: <20D78BB2-D645-4ACA-B897-5F59CB780280@gmail.com>

On Thu Oct 13 11:27:00 EDT 2011, slash.9fans@gmail.com wrote:
>
> > latin-1 bytes 00-FF turn into unicode runes 00-FF.
>
> Then why doesn't it Just Work? Now I am confused (again).

unicode codepoints (runes) are abstract.  we need to deal with encodings.
the encoding utf-8 uses is not a single byte for anything above 0x7f.
so essentially the encoding phase would be name[i] = (uchar)r.  the decoding phase
would be r = (Rune)name[i].

i think you can see the decoding in action in upas/fs.
but you can probablly write the code faster.

- erik



  reply	other threads:[~2011-10-13 15:30 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
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 [this message]
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=2fea5b8834e93aa22dabcd313e61c066@brasstown.quanstro.net \
    --to=quanstro@quanstro.net \
    --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).