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

Re: Character set problems



TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp> writes:

> In order to see them properly, there are 2 solutions.  The first one
> is converting ISO 8859-1 charactes to numeric character references
> which is defined by HTML4, and the second one is rebuilding `w3mmee'
> package.
> 
> In the first solution, you must (1) install `mule-ucs' package, (2)
> run `dpkg-reconfigure locales' to generate `ja_JP.eucJP' locale, and
> (3) put this expression
> 
>     (setq w3m-process-environment '(("LANG" "ja_JP.eucJP")))
> 
> into your ~/.emacs.

This indeed did the trick but this also has the unfortunate
side-effect of getting me Japanese version of, at least,
<http://www.google.com>.  It seems that Debian's w3m is a shell
script that ends up running w3m-ssl-ja if the locale is
ja_JP.eucJP.  I guess that w3m-ssl-ja sends something to the WWW
server that makes it send the Japanese version of the page.

If this can be made to work without such side-effects, I think it
would be nice if emacs-w3m did (3) automatically.  After all, I
have already told Emacs that my language environment is latin-1 so
that should really be enough for WWW pages with unknown
character set to be defaulted to ISO 8859-1.

Btw, it seems that emacs-w3m tries to locally augment process
environment using w3m-process-environment this way:

(let (...
      (process-environment process-environment)
      ...)
  (dolist ... (setenv ... ...)))

This obviously doesn't work if some variable is set already because
then setenv mutates process-environment.  I have fixed this in my
asynchronous version of emacs-w3m by introducing
w3m-with-augmented-process-environment.  I'll try to post a patch
of my version against the latest normal version soon (I'm ill at
the moment so this may take few days) so you can take that bugfix
from it.

> In the second solution, you have to apply `patches/post-header.patch'
> before rebuilding `w3mmee' package in order to get an executable which
> accepts `-header' option and `-post' option.  And, you must put this
> following expression
> 
>     (setq w3m-type 'w3mmee)
> 
> into your ~/.emacs.

I'll try this some day.  I'd prefer an approach that works with
stock Debian packages of w3m[mee], though.

-- 
Hannu
Please don't send copies of list mail