From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: dashes and non-breaking spaces
Date: Sat, 15 Jan 2005 15:05:52 +0100 [thread overview]
Message-ID: <m3mzvayegv.fsf@seneca.benny.turtle-trading.net> (raw)
In-Reply-To: <sh8y6vkx2l.fsf@tux.gnu.franken.de> (Karl Eichwalder's message of "Sat, 15 Jan 2005 07:47:46 +0100")
Hi Karl, all,
Karl Eichwalder writes:
> Broken by the mail program of my mail partner. His mail program
> treats all mails as iso-8859-1 resp. windows-1252 encoded and while
> he answers the encoding mixture happens.
>
> [...]
>
> I think it isn't worth the trouble (to many false positives?). If
> you want to try: If an iso-8859-1 labeled text contains escapes,
> most probably it is windows-1252 encoded; if there are still escapes
> and the text is quoted, try to treat it as UTF-8.
Those are not "escapes" strictly speaking. If you decode UTF-8 as
cp1252 or latin-1 you just get sequences of unusual non-ASCII
characters.
If the problem occurs regularly with texts marked as iso-8859-1, you
can try UTF-8 first and than fall back to cp1252.
First try to decode the text as UTF-8. Because UTF-8 follows some
very strict rules, it's possible to check for these rules, and than
the probability to mistake any non-UTF-8 text for UTF-8 is very low in
general (< 99%, I believe, even for short texts). This is even more
so for latin-1 or cp1252 texts, because these encode languages where
sequences of non-ASCII characters are rare in the first place.
If the text is not UTF-8, just treat it as cp1252. Encoding-wise all
texts that are latin-1 can be displayed as cp1252 without any
problems.
benny
next prev parent reply other threads:[~2005-01-15 14:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-28 13:21 dashes and non-breaking spaces Paul Pogonyshev
2004-12-29 21:08 ` Stefan Monnier
2005-01-02 15:24 ` Paul Pogonyshev
2005-01-04 20:53 ` Karl Eichwalder
2005-01-05 5:46 ` Juri Linkov
2005-01-06 4:53 ` Richard Stallman
2005-01-12 2:02 ` Juri Linkov
2005-01-12 4:41 ` Miles Bader
2005-01-12 6:39 ` Karl Eichwalder
2005-01-12 20:58 ` Miles Bader
2005-01-12 21:58 ` Stefan Monnier
2005-01-12 22:07 ` Miles Bader
2005-01-12 22:30 ` Stefan Monnier
2005-01-13 9:29 ` David Kastrup
2005-01-13 10:37 ` Miles Bader
2005-01-14 11:33 ` Richard Stallman
2005-01-13 20:29 ` Richard Stallman
2005-01-13 21:11 ` Karl Eichwalder
2005-01-13 21:24 ` Stefan Monnier
2005-01-13 21:59 ` Karl Eichwalder
2005-01-15 0:12 ` Richard Stallman
2005-01-15 6:47 ` Karl Eichwalder
2005-01-15 14:05 ` Benjamin Riefenstahl [this message]
2005-01-15 15:36 ` Karl Eichwalder
2005-01-15 17:30 ` Benjamin Riefenstahl
2005-01-13 21:39 ` Paul Pogonyshev
2005-01-15 0:12 ` Richard Stallman
2005-01-07 13:59 ` Kim F. Storm
2005-01-07 23:04 ` Richard Stallman
2005-01-09 2:17 ` Kim F. Storm
2005-01-03 4:31 ` Richard Stallman
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=m3mzvayegv.fsf@seneca.benny.turtle-trading.net \
--to=b.riefenstahl@turtle-trading.net \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/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.