[32570] in Perl-Users-Digest
Perl-Users Digest, Issue: 3839 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Dec 16 21:09:18 2012
Date: Sun, 16 Dec 2012 18:09:05 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 16 Dec 2012 Volume: 11 Number: 3839
Today's topics:
Re: help - how to find what is the code for "+/-" symbo <hjp-usenet2@hjp.at>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 16 Dec 2012 12:43:34 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: help - how to find what is the code for "+/-" symbol copied from Windows app
Message-Id: <slrnkcrcv6.htc.hjp-usenet2@hrunkner.hjp.at>
On 2012-12-15 14:04, Ben Morrow <ben@morrow.me.uk> wrote:
> Quoth "Peter J. Holzer" <hjp-usenet2@hjp.at>:
>> Or just copy/paste the sign into your source code:
>>
>> #!/usr/bin/perl
>> use warnings;
>> use strict;
>> use utf8;
>>
>> my $text = "the result is 8±2";
>
> Should I comment on the irony of your newsreader having converted that
> to ISO8859-1? :)
That's a feature, not a bug. Usenet is (except for the binaries groups)
a text medium: The content of a usenet posting consists of characters,
not bytes. Of course for transport it has to be encoded into some
sequence of bytes, but as long as the encoding/decoding process is
lossless, the NUA is free to employ any encoding it likes.
In my case I have configured the following outgoing charsets:
us-ascii,iso-8859-1,iso-8859-15,utf-8
The order is significant, so since my posting contained characters
which could not be represented in us-ascii, but could be represented in
iso-8859-1, the latter was used. If I had also used a euro sign, it
would have used iso-8859-15; and if I had used typographical quotes, it
would have used utf-8.
> (This is why I'm slightly suspicious of the whole idea of non-ASCII
> source code. It's fine as long as it's just in a file, but tends to be
> much less likely to survive diffs/mailing-list posts/&c. without being
> mangled.)
That can usually be avoided by attaching the diffs or code instead of
including them in the main text part. It also makes them easier to hande
for the receiver.
Also Non-ASCII characters aren't the only ones mangled by common
NUAs/MUAs. Many fold long lines, some remove leading whitespace, some
change tabs into spaces, ...
At least an unintended charset conversion can be easily undone with
iconv or similar tools - other changes which MUAs are likely to inflict
on a text are generally not reversible.
hp
--
_ | Peter J. Holzer | Fluch der elektronischen Textverarbeitung:
|_|_) | Sysadmin WSR | Man feilt solange an seinen Text um, bis
| | | hjp@hjp.at | die Satzbestandteile des Satzes nicht mehr
__/ | http://www.hjp.at/ | zusammenpaßt. -- Ralph Babel
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 3839
***************************************