all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
Cc: "Jari Aalto+mail.emacs" <jari.aalto@cante.net>
Subject: Re: html2text
Date: Tue, 09 Nov 2004 23:44:24 +0100	[thread overview]
Message-ID: <v9oei6d4mv.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: v9bre8qqyh.fsf@marauder.physik.uni-ulm.de

On Mon, Nov 08 2004, Reiner Steib wrote:

> [ The suggested patch from Jari's original message was: ]
>
> --8<---------------cut here---------------start------------->8---
> --- html2text.el.7.10	2004-11-06 17:20:46.000000000 +0200
> +++ html2text.el	2004-11-06 17:41:12.000000000 +0200
> @@ -42,8 +42,42 @@
>  (defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr)))
>
>  (defvar html2text-replace-list
> -  '(("&nbsp;" . " ") ("&gt;" . ">") ("&lt;" . "<") ("&quot;" . "\"")
> -    ("&amp;" . "&") ("&apos;" . "'"))
> +  '(("&acute;" . "`")

This should be "´".

> +    ("&amp;" . "&")
> +    ("&apos;" . "'")
> +    ("&brvbar;" . "|")
> +    ("&cent;" . "c")
> +    ("&circ;" . "^")
> +    ("&copy;" . "(C)")
> +    ("&curren;" . "¤")
> +    ("&deg;" . "degree")
> +    ("&divide;" . "/")
> +    ("&euro;" . "e")
> +    ("&frac12;" . "½")
[...]

It seems strange to use Latin-1 characters for some entities, but not
for all encodable by Latin-1.

On a second thought, it looks like there are already more or less
complete lists[1] e.g. in `mm-url-html-entities' (from Gnus),
`sgml-char-names', `sgml-char-names-table', `iso-iso2sgml-trans-tab'
(Emacs) or `w3m-entity-alist' (emacs-w3m).

Probably one of these could be used.  Hm, maybe the function
`iso-sgml2iso' could be used in `html2text.el'?

Bye, Reiner.

[1] Might be checked with
    http://www.w3.org/TR/REC-html40/sgml/entities.html or other
    tables.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

  parent reply	other threads:[~2004-11-09 22:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-31 18:25 html2text Alfred M. Szmidt
2004-11-01 11:55 ` html2text Reiner Steib
2004-11-01 19:21   ` html2text Alfred M. Szmidt
2004-11-02  4:46   ` html2text Katsumi Yamaoka
2004-11-02  9:22     ` html2text Reiner Steib
2004-11-02 11:59       ` html2text Katsumi Yamaoka
2004-11-02 14:12         ` html2text Reiner Steib
     [not found] ` <mzxv9dyj.fsf@blue.sea.net>
2004-11-08 15:51   ` html2text Reiner Steib
2004-11-08 18:02     ` html2text David Kastrup
2004-11-09 22:44     ` Reiner Steib [this message]
2004-11-15  8:31     ` html2text Jari Aalto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=v9oei6d4mv.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=jari.aalto@cante.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.