From: Linus Torvalds <torvalds@osdl.org>
To: Paul Eggert <eggert@CS.UCLA.EDU>
Cc: Junio C Hamano <junkio@cox.net>,
Robert Fitzsimons <robfitz@273k.net>,
Alex Riesen <raa.lkml@gmail.com>,
git@vger.kernel.org, Kai Ruemmler <kai.ruemmler@gmx.net>
Subject: Re: [PATCH] Try URI quoting for embedded TAB and LF in pathnames
Date: Wed, 12 Oct 2005 14:24:31 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0510121411550.15297@g5.osdl.org> (raw)
In-Reply-To: <87vf02qy79.fsf@penguin.cs.ucla.edu>
On Wed, 12 Oct 2005, Paul Eggert wrote:
>
> Worse, when I used Emacs to copy your text into another file -- the
> sort of thing that is likely to be done with an emailed patch -- the
> file contained the UTF-8 encoding of the gibberish, rather than the
> original bytes of your message.
Btw, this is an example of where locale-based character translations just
fundamentally suck.
cut-and-paste quote naturally tries to translate between the source
and destination locales, but it fundamentally cannot work. The only thing
that ever works is bit-for-bit copying.
Any program that tries to do locale conversion is always going to be a bug
waiting to happen.
If GNU emacs does locale translations rather than just do a binary
transfer of the data, then that's a sign that GNU emavs is being really
stupid. If the data was UTF-8 to begin with, then a binary copy is also
going to be UTF-8. And if it wasn't UTF-8, then a binary copy is the only
thing that is sensible.
And this is the thing that makes UTF-8 so wonderful: exactly the fact that
it makes bit-for-bit copying an acceptable policy again, and locales
become a non-issue. In a truly UTF-8 world, you should _never_ convert
anything at all (and that includes mis-formed UTF-8).
Any non-binary file saving or transfer approach where characters have
"meaning" is always mistake. It's why DOS/Windows "binary" vs "text" files
was wrong. It's why font-encoding locales are wrong (Mixed text with two
types? Yet another metadata quoting scheme? No thank you! It's also why
UCS-16 and UCS-32 were total disasters: they had "context" in their
encoding).
Say "yes" to binary transfer. Because text transfers are broken.
Linus
next prev parent reply other threads:[~2005-10-12 21:24 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-07 19:35 [RFC] embedded TAB and LF in pathnames Junio C Hamano
2005-10-07 23:29 ` Alex Riesen
2005-10-07 23:44 ` Junio C Hamano
2005-10-08 6:45 ` Alex Riesen
2005-10-08 9:10 ` Junio C Hamano
2005-10-08 13:30 ` [PATCH] Try URI quoting for " Robert Fitzsimons
2005-10-08 18:30 ` Junio C Hamano
2005-10-08 20:19 ` Junio C Hamano
2005-10-11 6:20 ` Paul Eggert
2005-10-11 7:37 ` Junio C Hamano
2005-10-11 15:17 ` Linus Torvalds
2005-10-11 18:03 ` Paul Eggert
2005-10-11 18:37 ` Linus Torvalds
2005-10-11 19:42 ` Paul Eggert
2005-10-11 20:56 ` Linus Torvalds
2005-10-12 6:51 ` Paul Eggert
2005-10-12 14:59 ` Linus Torvalds
2005-10-12 19:07 ` Daniel Barkalow
2005-10-12 19:52 ` Linus Torvalds
2005-10-12 20:21 ` H. Peter Anvin
[not found] ` <87vf02qy79.fsf@penguin.cs.ucla.edu>
2005-10-12 21:02 ` Junio C Hamano
2005-10-12 21:05 ` Linus Torvalds
2005-10-12 21:09 ` H. Peter Anvin
2005-10-12 21:15 ` Johannes Schindelin
2005-10-12 21:33 ` Junio C Hamano
2005-10-14 0:57 ` Paul Eggert
2005-10-14 5:43 ` Linus Torvalds
2005-10-12 21:24 ` Linus Torvalds [this message]
2005-10-14 0:16 ` Paul Eggert
2005-10-14 5:20 ` Linus Torvalds
2005-10-14 17:18 ` H. Peter Anvin
2005-10-14 6:59 ` Junio C Hamano
2005-10-09 10:42 ` Junio C Hamano
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=Pine.LNX.4.64.0510121411550.15297@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=eggert@CS.UCLA.EDU \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=kai.ruemmler@gmx.net \
--cc=raa.lkml@gmail.com \
--cc=robfitz@273k.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).