Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tlug: japanese subjects, Pgnus, VM?



"Start me up!" -- M. Jagger

>>>>> "Mike" == Mike Fabian <mike.fabian@example.com> writes:

    Mike> Pgnus 0.96, XEmacs 21.1 [and] VM 6.72 also displays only
    Mike> mojibake for subjects containing raw iso-2022-jp code.

    Mike> Am I right to assume that this problem is not the fault of
    Mike> Pgnus and VM, but rather caused by the MUAs which did send
    Mike> these mails?

According to the RFCs, yes.  I don't know how larsi feels about this,
but Kyle went so far as to reject contributions I submitted to (a) fix 
missing MIME Content-Type headers and (b) [partially] fix raw
non-ASCII code in header:  "better that the users should see it and
bitch to their correspondents."

    Mike> If so, why do almost all of them screw up the subjects
    Mike> almost all of the time?

Because if you use Microsoft OSes, you don't have to worry about
multilingual environments.  They're not available.  So coders for MS
environments can take shortcuts by assuming that they will only get
codes suitable for their locale.

    Mike> Is it really so that all these MUAs broken when it comes to
    Mike> sending Japanese subjects?

Yes.

    Mike> Is it possible to setup Pgnus and/or VM to display readable
    Mike> Japanese even for such broken subjects?

Probably not.  ... On second thought:

(defun happy-birthday-mike! ()
  "Convert a subject header from mojibake in a message edit buffer.

Note VM does not allow editing messages in the Presentation buffer.
This also will not affect summary buffers.

Handles folded headers.  Other character sets left as an
exercise for the reader."

  (interactive)
  ;; assume buffer is narrowed to single message
  (goto-char (point-min))
  (search-forward "Subject: ")
  (let* ((begin (point))
         (end (progn
                (while
                   (progn
                     (end-of-line)
                     (point)
                     (forward-char)
                     (looking-at "[ \t]")))
                (point))))
    (decode-coding-region begin end 'iso-2022-jp)))

An alternative would be to actually edit the message and convert the
headers to MIME format, but that would be much harder to do (there are 
restrictions on length of MIME encoded-words as well as total line
length that have to be obeyed).

The problem with "configuring the MUA" is that detecting broken
headers automatically is hard, and coming up with a generic "fix this
header" function is almost as hard even though you can probably count
on some user help.  So larsi and Kyle prefer to work on implementing
the standard correctly :-P

    Mike> Does anybody know what sort of option that could be? When I
    Mike> was at a friends place who uses `Mozilla 4.51 [ja] (Win98;
    Mike> I)', I searched for such an option but couldn't find
    Mike> anything like that.

Use an external editor?  ;-)  Or maybe metamail.

The Mozilla guys I've seen discuss I18N are pretty serious, so I
suppose they do have an option.  But I have no idea where it is.


-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
__________________________________________________________________________
__________________________________________________________________________
What are those two straight lines for?  "Free software rules."
-------------------------------------------------------------------
Next Nomikai: September 17 (Fri), 19:30 Tengu TokyoEkiMae 03-3275-3691
Next Technical Meeting: October 9 (Sat), 13:00     place: Temple Univ.
-------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links