9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Kenji Arisawa <arisawa@ar.aichi-u.ac.jp>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] utf-8 text files from httpd
Date: Mon, 19 Oct 2009 21:45:57 +0900	[thread overview]
Message-ID: <602B15C1-A53C-467F-AB4C-5C820228D998@ar.aichi-u.ac.jp> (raw)
In-Reply-To: <fe41879c0910190300l51480646pf9630e90c6f30207@mail.gmail.com>

I think it is difficult to make web server to work correctly in case
we have variety of charset text files on the server.
Although we can manually select charset in browser menu, the selection
is useless in case the page is written in Javascript that fills some
portion of a page reading a text file.
(note that the text file will be interpreted as ascii without
"charset" in http header.)
I believe the only solution every thing work correctly is to write all
text files in utf-8 and put "charset=utf-8" in http header as Erik is
trying.

P.S.
file(1) speaks only mine type but not charset.
it is difficult or impossible to determine charset from a few japanese
letters.

Kenji Arisawa


On 2009/10/19, at 19:00, Akshat Kumar wrote:

> new/sendfd.c:243 c old/sendfd.c:243
> <
> ---
>> /*
> new/sendfd.c:246 c old/sendfd.c:246
> <
> ---
>> */
>
> (context: text/plain -> text/plain; charset=utf-8)
>
> Now my text files can be read in the proper encoding
> by default, and are not interpreted by browsers (as
> well as certain applications) to be whack ASCII.
>
> Is the output of file(1) appropriate for this purpose?
> Shouldn't your sample file also be sent as UTF-8?
>
> Thank you for the input, Mr. Arisawa. I agree with
> Erik in this case, as you wouldn't be doing much with
> files of other encodings on Plan 9 (well, prior to a
> tcs(1)), you really only need to worry about getting
> across UTF-8.
>
> The point about file handling being up to browsers is
> appropriate. However, I'd like to push as much standard
> behaviour from the server as I can. If there's an explicit
> account of the encoding and type of a file, then there
> ought to be no ambiguity.
>
>
> Thanks,
> ak
>




  reply	other threads:[~2009-10-19 12:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<fe41879c0910181734l6363baebsa896bda992d690@mail.gmail.com>
2009-10-19  1:37 ` erik quanstrom
2009-10-19 10:00   ` Akshat Kumar
2009-10-19 12:45     ` Kenji Arisawa [this message]
     [not found] <<df49a7370910190732i526a15b6o6d2822cd2d14bff0@mail.gmail.com>
2009-10-19 14:50 ` erik quanstrom
     [not found] <<df49a7370910190649k3179f0b1r4c877d5ca72af232@mail.gmail.com>
2009-10-19 13:55 ` erik quanstrom
2009-10-19 14:32   ` roger peppe
2009-10-19 17:36     ` lucio
     [not found] <<fe41879c0910190300l51480646pf9630e90c6f30207@mail.gmail.com>
2009-10-19 13:14 ` erik quanstrom
2009-10-19 13:49   ` roger peppe
2009-10-19  9:05 Eris Discordia
     [not found] <<A6127A93-8E78-4E11-9284-56A16D2A2093@ar.aichi-u.ac.jp>
2009-10-19  4:46 ` erik quanstrom
  -- strict thread matches above, loose matches on Subject: below --
2009-10-19  0:34 Akshat Kumar
2009-10-19  1:39 ` andrey mirtchovski
2009-10-19  2:16 ` Kenji Arisawa
2009-10-19  3:35   ` Kenji Arisawa

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=602B15C1-A53C-467F-AB4C-5C820228D998@ar.aichi-u.ac.jp \
    --to=arisawa@ar.aichi-u.ac.jp \
    --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).