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

Re: UTF-8 links in big5 page

In [emacs-w3m : No.11649] Katsumi Yamaoka wrote:
> AFAIK some sites require a browser to use the charset that is used
> to encode the page to encode a url to retrieve, some allow both
> page's charset and utf-8, and some require utf-8 unconditionally.

But many sites likely recognize url encoded by utf-8 nowadays.
So, I've changed emacs-w3m so as to use utf-8 by default to
encode urls to retrieve.  As for old sites that requires a
browser to use the coding system other than utf-8 to encode urls,
I added this user option:
| w3m-url-coding-system-alist is a variable defined in `w3m.el'.
| Its value is ((nil . utf-8))
| Documentation:
| Alist of url regexps and coding systems used to encode url to retrieve.
| Regexp nil means any url; element of which the car is nil, that is the
| default, has to be the last item of this alist.  Coding system nil
| means using the coding system corresponding to a charset that is used
| to encode the current page.
| If the example.com site requires a browser to use `shift_jis' to encode
| url for example, you can add it to this variable as follows:
| (add-to-list
|  'w3m-url-coding-system-alist
|  "\\`https?://\\(?:[^./?#]+\\.\\)*example\\.com/" . shift_jis)

BTW, users who have customized the `w3m-show-decoded-url' variable
will possibly encounter an error when launching emacs-w3m.  It no
longer exists, so please delete those things manually.