🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

5 total messages Started by 飯島昭博 /Iijima Akihiro Wed, 30 Sep 1998 00:00
encode filename
#49
Author: 飯島昭博 /Iijima Akihiro
Date: Wed, 30 Sep 1998 00:00
63 lines
3262 bytes
MIME$B$N(B multipart$B$G(B $B$G%U%!%$%k$rE:IU$9$k$H(B
$B$3$N$h$&$KCf$K%X%C%@ItJ,$,$G$-$^$9$,!"(B

Content-type: image/x-MS-bmp;
     name="=?iso-2022-jp?B?GyRCJU0lLyU/JSQbKEIuYm1w?="
Content-Disposition: attachment; filename="
	=?iso-2022-jp?B?GyRCJU0lLyU/JSQbKEIuYm1w?="
Content-transfer-encoding: base64
Content-Description: Windows Bitmap
 
$B$=$3$G(B name= $B$H$+(B filename= $B$H$$$&ItJ,$,$"$C$F(B
$B%U%!%$%kL>$,F~$C$?$j$7$^$9!#(B

$B85$N%U%!%$%kL>$,F|K\8l$N$H$-$K(B $B$3$NItJ,$,(B
  MIME$BJQ49(B(encoded-word)$B$5$l$?%U%!%$%kL>$,$D$$$?$j(B
  MIME$BJQ49$5$l$:$KF|K\8l$N$^$^$@$C$?$j(B
$B%a!<%i$K$h$C$F$^$A$^$A$G$9!#(B

$B$3$l$O(B RFC$B$G$O(B $B$I$A$i$,@5$7$$$N$G$7$g$&$+!)(B

	$B!v!v!v(B

$BD4$Y$F8+$k$H(B MIME$B$N(B RFC$B$O(B

2045 Multipurpose Internet Mail Extensions (MIME) Part One: Format of
     Internet Message Bodies. N. Freed & N. Borenstein. November 1996.
     (Format: TXT=72932 bytes) (Obsoletes RFC1521, RFC1522, RFC1590)
     (Updated by RFC2184, RFC2231) (Status: DRAFT STANDARD)

2046 Multipurpose Internet Mail Extensions (MIME) Part Two: Media
     Types. N. Freed & N. Borenstein. November 1996. (Format: TXT=105854
     bytes) (Obsoletes RFC1521, RFC1522, RFC1590) (Status: DRAFT STANDARD)

2047 MIME (Multipurpose Internet Mail Extensions) Part Three: Message
     Header Extensions for Non-ASCII Text. K. Moore. November 1996.
     (Format: TXT=33262 bytes) (Obsoletes RFC1521, RFC1522, RFC1590)
     (Updated by RFC2184, RFC2231) (Status: DRAFT STANDARD)

2048 Multipurpose Internet Mail Extensions (MIME) Part Four:
     Registration Procedures. N. Freed, J. Klensin & J. Postel. November
     1996. (Format: TXT=45033 bytes) (Obsoletes RFC1521, RFC1522, RFC1590)
     (Also BCP0013) (Status: BEST CURRENT PRACTICE)

2049 Multipurpose Internet Mail Extensions (MIME) Part Five:
     Conformance Criteria and Examples. N. Freed & N. Borenstein. November
     1996. (Format: TXT=51207 bytes) (Obsoletes RFC1521, RFC1522, RFC1590)
     (Status: DRAFT STANDARD)

$B$3$N(B 5$B$D$N$h$&$G$9$,!"(Brfc2047$B$r$_$k$H(B $BCfDx$G(B

5. Use of encoded-words in message headers
   + An 'encoded-word' MUST NOT be used in parameter of a MIME
     Content-Type or Content-Disposition field, or in any structured
     field body except within a 'comment' or 'phrase'.

$B$H=q$$$F$"$j$^$9!#(B

  Content-Type $B$d(B Content-Disposition $B$H$$$&(B field$B$G$O(B
  encoded-word $B$r;H$C$F$O(B $B$$$1$J$$(B
$B$H(BRFC$B$O8@$C$F$$$k$s$G$9$h$M!)(B
--
$BEl5~9)6HBg3X(B $BAm9g>pJs=hM}%;%s%?!<(B $B%M%C%H%o!<%/%7%9%F%`1?MQ3](B
	$BHSEg(B $B><Gn(B (Akihiro Iijima) aki@noc.titech.ac.jp
Re: encode filename
#50
Author: Tanaka Akira
Date: Wed, 30 Sep 1998 00:00
18 lines
1700 bytes
In article <AKI.98Sep30152244@nocs3.noc.titech.ac.jp>,
  aki@noc.titech.ac.jp (飯島昭博 /Iijima  Akihiro) writes:

> そこで name= とか filename= という部分があって
> ファイル名が入ったりします。
> 
> 元のファイル名が日本語のときに この部分が
>   MIME変換(encoded-word)されたファイル名がついたり
>   MIME変換されずに日本語のままだったり
> メーラによってまちまちです。
> 
> これは RFCでは どちらが正しいのでしょうか?

日本語を入れるという意味ではどちらもまちがいです。

US-ASCII 以外の文字を parameter に使う方法は RFC2231 で決まっています。
-- 
[田中 哲][たなか あきら][Tanaka Akira]
Re: encode filename
#51
Author: 飯島昭博 /Iijima Akihiro
Date: Wed, 30 Sep 1998 00:00
45 lines
2367 bytes
$B$9$s$^$;$s(B $B65$($F$/$@$5$$!#(B

> $BF|K\8l$rF~$l$k$H$$$&0UL#$G$O$I$A$i$b$^$A$,$$$G$9!#(B
> US-ASCII $B0J30$NJ8;z$r(B parameter $B$K;H$&J}K!$O(B RFC2231 $B$G7h$^$C$F$$$^$9!#(B

 Content-type: image/x-MS-bmp;
      name="=?iso-2022-jp?B?GyRCJU0lLyU/JSQbKEIuYm1w?="
 Content-Disposition: attachment;
      filename="=?iso-2022-jp?B?GyRCJU0lLyU/JSQbKEIuYm1w?="
 
$B$3$N(B name$B$d(B filename$B$O(B MIME$B$N@bL@$G$NMQ8l$G$$$&$H(B $B$J$K$KAjEv$9$k$N$G$7$g(B
$B$&$+!)(B

$B;d$O(B
  Content-type: image/x-MS-bmp; name="??????"
$B$3$N#19TA4BN$O(B RFC2045$B$h$j(B
    (2)   A Content-Type header field, generalized from RFC 1049,
          which can be used to specify the media type and subtype
          of data in the body of a message and to fully specify
          the native representation (canonical form) of such
          data.
$B$H$+(B
5.  Content-Type Header Field
$B$K=q$$$F$"$k$N$G(B $B$?$/$5$s<oN`$N$"$k(Bheader$B$NCf$N(B $B$R$H$D!"(B
multipart$B$N>l9g$G$b(B $B$=$NCf$N(B1$B$D$N(Bpart$B$G8+$?>l9g$K$O(B $B$=$N(B header$BItJ,$K(B
$B8=$l$k$b$N(B $B$H;W$C$F$$$^$7$?!#(B

$B$3$N(B 1$B9TA4BN$N$3$H$O(B
  Content-Type Header Field
$B$H8F$Y$P$$$$$N$G$7$g$&$+!)(B



$B$G(B $B$3$NItJ,!"(B name="??????" $B$@$1$r<($9>l9g$O!"(B
5.1.  Syntax of the Content-Type Header Field
     content := "Content-Type" ":" type "/" subtype
                *(";" parameter)
                ; Matching of media type and subtype

parameter $B$H8F$V$N$,$$$$$N$G$7$g$&$+!)(B

$B$H$j$"$($:(B $B$3$3$^$G!#(B
--
$BEl5~9)6HBg3X(B $BAm9g>pJs=hM}%;%s%?!<(B $B%M%C%H%o!<%/%7%9%F%`1?MQ3](B
	$BHSEg(B $B><Gn(B (Akihiro Iijima) aki@noc.titech.ac.jp
Re: encode filename
#52
Author: Tanaka Akira
Date: Wed, 30 Sep 1998 00:00
13 lines
1485 bytes
In article <AKI.98Sep30185956@nocs3.noc.titech.ac.jp>,
  aki@noc.titech.ac.jp (飯島昭博 /Iijima Akihiro) writes:

> この 1行全体のことは
>   Content-Type Header Field
> と呼べばいいのでしょうか?

> parameter と呼ぶのがいいのでしょうか?

なんに疑問に持っているんでしょう?
なにかそう呼んではまずいことがあるんですか?
-- 
[田中 哲][たなか あきら][Tanaka Akira]
Re: encode filename
#53
Author: Koichi Nakatani
Date: Wed, 30 Sep 1998 00:00
20 lines
1514 bytes
なかたに@コニカ です。

飯島さん>
> で この部分、 name="??????" だけを示す場合は、
> 5.1.  Syntax of the Content-Type Header Field
>      content := "Content-Type" ":" type "/" subtype
>                 *(";" parameter)
>                 ; Matching of media type and subtype
> 
> parameter と呼ぶのがいいのでしょうか?

その通りだと思います。
parameter は「attribute "=" value」という形になっていて、
さらに、 attribute は token から成り、 value は token または
quoted-string から成る、ということのようですね。(RFC 2045 そのまま)

これで質問への答えになったでしょうか?
-- 
中谷 康一
コニカ株式会社 グラフィックアーツセンター
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads