1.8.0 Toyama \e$(BIY;3\e(B ; = JR \e$(B9b;3K\@~!"IY;39A@~\e(B
1.8.1 Kureha \e$(B8b1)\e(B
1.8.2 Kosugi \e$(B>.?y\e(B
-1.8.3 Ecch\e-Dþ-Daimon\e-A \e$(B1[CfBgLg\e(B
+1.8.3 Ecch\e-Dþ-Daimon \e$(B1[CfBgLg\e(B\e-A
1.8.4 Takaoka \e$(B9b2,\e(B ; = JR \e$(BI98+@~!">kC<@~\e(B
-: : :
+1.8.5 Nishi-Takaoka \e$(B@>9b2,\e(B
+----- Fukuoka \e$(BJ!2,\e(B
+----- Isurugi \e$(B@PF0\e(B
+----- Kurikara \e$(B6fMx2@Me\e(B
+----- Tsubata \e$(BDEH(\e(B
+----- Morimoto \e$(B?9K\\e(B
------- Higashi-Kanazawa \e$(BEl6bBt\e(B
------- Kanazawa \e$(B6bBt\e(B ; <=> \e$(BKLN&E4F;\e(B \e$(BKLE46bBt\e(B
------- Nishi-Kanazawa \e$(B@>6bBt\e(B ; <=> \e$(BKLN&E4F;\e(B \e$(B?7@>6bBt\e(B
;;-------------------------------------------------------------------------
;; East Japan Railway \e$(BElF|K\N95RE4F;\e(B http://www.jreast.co.jp/
-;; T\e-Dòkaidò\e-A Line \e$(BEl3$F;K\@~\e(B
+;; T\e-Dòkaidò Line \e$(BEl3$F;K\@~\e(B\e-A
;;-------------------------------------------------------------------------
-1.2.0 T\e-Dòkyò\e-A \e$(BEl5~\e(B
+1.2.0 T\e-Dòkyò \e$(BEl5~\e(B\e-A
1.2.1 Shinbashi \e$(B?766\e(B ; = JR \e$(B;3<j@~!"2#?\2l@~\e(B
1.2.2 Shinagawa \e$(BIJ@n\e(B ; = JR \e$(B;3<j@~!"2#?\2l@~\e(B
1.2.3 Kawasaki \e$(B@n:j\e(B ; = JR \e$(BFnIp@~\e(B
1.2.4 Yokohama \e$(B2#IM\e(B ; = JR \e$(B5~IMElKL@~!&:,4_@~!"2#?\2l@~\e(B
1.3.0 Totsuka \e$(B8MDM\e(B ; = JR \e$(B2#?\2l@~\e(B
-1.3.1 \e-DÒfuna\e-A \e$(BBgA%\e(B ; = JR \e$(B:,4_@~!"2#?\2l@~\e(B
+1.3.1 \e-DÒfuna \e$(BBgA%\e(B ; = JR \e$(B:,4_@~!"2#?\2l@~\e(B\e-A
1.4.0 Fujisawa \e$(BF#Bt\e(B ; <=> \e$(B>.ED5^EEE4\e(B \e$(B9>%NEg@~!"9>%NEgEEE4\e(B
-1.4.1 Tsujid\e-Dò\e-A \e$(@DT\e$(BF2\e(B ; \e$(B!J!V\e$(@DT\e$(B!W\e(B= J90@B-4454:128b\e$(B!K\e(B
+1.4.1 Tsujid\e-Dò \e$(@DT\e$(BF2\e(B ; \e$(B!J!V\e$(@DT\e$(B!W\e(B= J90@B-4454:128b\e$(B!K\e(B\e-A
1.4.2 Chigasaki \e$(B3}%v:j\e(B ; = JR \e$(BAjLO@~\e(B
1.4.3 Hiratsuka \e$(BJ?DM\e(B
-1.4.4 \e-DÒiso\e-A \e$(BBg0k\e(B
-1.4.5 Ninomiya \e$BFs5\\e(B
-1.4.6 K\e-Dòzu\e-A \e$(B9qI\DE\e(B ; = JR \e$(B8fEB>l@~\e(B
-1.5.0 Kamonomiya \e$B3{5\\e(B
-1.5.1 Odawara \e$B>.ED86\e(B ; <=> \e$B>.ED5^!"H":,EP;3E4F;!"\e(B
- ; \e$B0KF&H":,E4F;\e(B
-1.5.2 Hayakawa \e$BAa@n\e(B
-1.5.3 Nebukawa \e$B:,I\@n\e(B
-1.5.4 Manazuru \e$B??Da\e(B
-1.6.0 Yugawara \e$BEr2O86\e(B
+1.4.4 \e-DÒiso \e$(BBg0k\e(B\e-A
+1.4.5 Ninomiya \e$(BFs5\\e(B
+1.4.6 K\e-Dòzu \e$(B9qI\DE\e(B ; = JR \e$(B8fEB>l@~\e(B\e-A
+1.5.0 Kamonomiya \e$(B3{5\\e(B
+1.5.1 Odawara \e$(B>.ED86\e(B ; <=> \e$(B>.ED5^!"H":,EP;3E4F;!"\e(B
+ ; \e$(B0KF&H":,E4F;\e(B
+1.5.2 Hayakawa \e$(BAa@n\e(B
+1.5.3 Nebukawa \e$(B:,I\@n\e(B
+1.5.4 Manazuru \e$(B??Da\e(B
+1.6.0 Yugawara \e$(BEr2O86\e(B
1.7.0 Atami \e$(BG.3$\e(B ; = JR \e$(B0KEl@~\e(B
;;-------------------------------------------------------------------------
;; Central Japan Railway \e$(BEl3$N95RE4F;\e(B
;;-------------------------------------------------------------------------
1.7.1 Kan'nami \e$(BH!Fn\e(B
-1.8.0 Mishima \e$B;0Eg\e(B ; = \e$B0KF&H":,E4F;\e(B
-1.8.1 Numazu \e$B>BDE\e(B ; = JR \e$(B8fEB>l@~\e(B
-1.8.2 Katahama \e$BJRIM\e(B
-1.8.4 Hara \e$B86\e(B
------ Higashi-Tagonoura \e$BElED;R%N1:\e(B
------ Yoshiwara \e$B5H86\e(B ; = \e$B3YFnE4F;\e(B
------ Fuji \e$BIY;N\e(B ; = JR \e$B?H1d@~\e(B
+1.8.0 Mishima \e$(B;0Eg\e(B ; = \e$(B0KF&H":,E4F;\e(B
+1.8.1 Numazu \e$(B>BDE\e(B ; = JR \e$(B8fEB>l@~\e(B
+1.8.2 Katahama \e$(BJRIM\e(B
+1.8.4 Hara \e$(B86\e(B
+1.8.5 Higashi-Tagonoura \e$(BElED;R%N1:\e(B
+----- Yoshiwara \e$(B5H86\e(B ; = \e$(B3YFnE4F;\e(B
+----- Fuji \e$(BIY;N\e(B ; = JR \e$(B?H1d@~\e(B
: : :
----- Kanayama \e$(B6b;3\e(B ; =\e$(B!J\e(BJR \e$(BCf1{K\@~!K\e(B
------ Ot\e-Dòbashi \e$(BHxF,66\e(B\e-A
+----- Ot\e-Dòbashi \e$(BHxF,66\e(B\e-A
----- Nagoya \e$(BL>8E20\e(B ; = JR \e$(B4X@>K\@~!J!&Cf1{K\@~!K\e(B
: : :
----- Gifu \e$(B4tIl\e(B ; = JR \e$(B9b;3K\@~\e(B
1.5.0 Shimao \e$(BEgHx\e(B
1.6.0 Amaharashi \e$(B1+@2\e(B
1.8.0 Ecch\e-Dþ-Kokubu \e$(B1[Cf9qJ,\e(B\e-A
-1.8.1 Fushiki \e$(BIzLZ\e(B ; <=> \e$B%&%i%8%*%9%C%H%C%/9RO)\e(B
-1.8.2 N\e-Dòmachi\e-A \e$(BG=D.\e(B
-1.8.3 Ecch\e-Dþ-Nakagawa\e-A \e$(B1[CfCf@n\e(B
+1.8.1 Fushiki \e$(BIzLZ\e(B ; <=> \e$(B%&%i%8%*%9%C%H%C%/9RO)\e(B
+1.8.2 N\e-Dòmachi \e$(BG=D.\e(B\e-A
+1.8.3 Ecch\e-Dþ-Nakagawa \e$(B1[CfCf@n\e(B\e-A
1.8.4 Takaoka \e$(B9b2,\e(B ; = JR \e$(BKLN&K\@~!">kC<@~\e(B
;;; @ file detection
;;;
-(defvar mime-file-content-type-alist
- '(("JPEG" image jpeg)
- ("GIF" image gif)
- ("Standard MIDI" audio midi)
+(defvar mime-magic-type-alist
+ '(("^\377\330\377[\340\356]..JFIF" image jpeg)
+ ("^\211PNG" image png)
+ ("^GIF8[79]" image gif)
+ ("^II\\*\000" image tiff)
+ ("^MM\000\\*" image tiff)
+ ("^MThd" audio midi)
+ ("^\000\000\001\263" video mpeg)
)
- "*Alist of \"file\" output patterns vs. corresponding media-types.
+ "*Alist of regexp about magic-number vs. corresponding media-types.
Each element looks like (REGEXP TYPE SUBTYPE).
-REGEXP is pattern for \"file\" command output.
+REGEXP is a regular expression to match against the beginning of the
+content of entity.
TYPE is symbol to indicate primary type of media-type.
SUBTYPE is symbol to indicate subtype of media-type.")
(defun mime-detect-content (entity situation)
- (let ((beg (mime-entity-point-min entity))
- (end (mime-entity-point-max entity)))
- (goto-char beg)
- (let* ((name (save-restriction
- (narrow-to-region beg end)
- (mime-entity-safe-filename entity)
- ))
- (encoding (or (cdr (assq 'encoding situation)) "7bit"))
- (filename (if (and name (not (string-equal name "")))
- (expand-file-name name mime-temp-directory)
- (make-temp-name
- (expand-file-name "EMI" mime-temp-directory)))))
- (mime-write-decoded-region (mime-entity-body-start entity) end
- filename encoding)
- (let (type subtype)
- (with-temp-buffer
- (call-process "file" nil t nil filename)
- (goto-char (point-min))
- (if (search-forward (concat filename ": ") nil t)
- (let ((rest mime-file-content-type-alist))
- (while (not (let ((cell (car rest)))
- (if cell
- (if (looking-at (car cell))
- (setq type (nth 1 cell)
- subtype (nth 2 cell))
- )
- t)))
- (setq rest (cdr rest))))))
- (if type
- (mime-raw-play-entity
- entity nil
- (put-alist 'type type
- (put-alist 'subtype subtype
- (del-alist 'method
- (copy-alist situation))))
- (cdr (assq 'ignore-examples situation))
- 'mime-detect-content)
- ))
- )))
+ (let (type subtype)
+ (let ((mdata (save-excursion
+ ;;(set-buffer (mime-entity-buffer entity))
+ (let* ((start (mime-entity-body-start entity))
+ (end (progn
+ (goto-char start)
+ (end-of-line)
+ (point))))
+ (mime-decode-string (buffer-substring start end)
+ (mime-entity-encoding entity))
+ )))
+ (rest mime-magic-type-alist))
+ (while (not (let ((cell (car rest)))
+ (if cell
+ (if (string-match (car cell) mdata)
+ (setq type (nth 1 cell)
+ subtype (nth 2 cell))
+ )
+ t)))
+ (setq rest (cdr rest))))
+ (if type
+ (mime-raw-play-entity
+ entity nil
+ (put-alist 'type type
+ (put-alist 'subtype subtype
+ (del-alist 'method
+ (copy-alist situation))))
+ (cdr (assq 'ignore-examples situation))
+ 'mime-detect-content)
+ ))
+ )
;;; @ mail/news message