Message from discussion
correct terminology for referring to strings
Received: by 10.204.154.76 with SMTP id n12mr4261893bkw.1.1343909153093;
Thu, 02 Aug 2012 05:05:53 -0700 (PDT)
X-BeenThere: erlang-programming@googlegroups.com
Received: by 10.204.143.140 with SMTP id v12ls2195131bku.6.gmail; Thu, 02 Aug
2012 05:05:52 -0700 (PDT)
Received: by 10.204.128.207 with SMTP id l15mr4259709bks.4.1343909152582;
Thu, 02 Aug 2012 05:05:52 -0700 (PDT)
Received: by 10.204.128.207 with SMTP id l15mr4259708bks.4.1343909152566;
Thu, 02 Aug 2012 05:05:52 -0700 (PDT)
Return-Path: <erlang-questions-boun...@erlang.org>
Received: from hades.cslab.ericsson.net (hades.cslab.ericsson.net. [192.121.151.104])
by gmr-mx.google.com with ESMTP id k7si1666693bks.2.2012.08.02.05.05.52;
Thu, 02 Aug 2012 05:05:52 -0700 (PDT)
Received-SPF: pass (google.com: domain of erlang-questions-boun...@erlang.org designates 192.121.151.104 as permitted sender) client-ip=192.121.151.104;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of erlang-questions-boun...@erlang.org designates 192.121.151.104 as permitted sender) smtp.mail=erlang-questions-boun...@erlang.org; dkim=neutral (body hash did not verify) header...@yahoo.com
Received: from hades.cslab.ericsson.net (hades [192.121.151.104])
by hades.cslab.ericsson.net (Postfix) with ESMTP id B409E5C12E;
Thu, 2 Aug 2012 14:05:45 +0200 (CEST)
X-Original-To: erlang-questi...@erlang.org
Delivered-To: erlang-questi...@erlang.org
Received: from nm3-vm0.bullet.mail.sp2.yahoo.com
(nm3-vm0.bullet.mail.sp2.yahoo.com [98.139.90.230])
by hades.cslab.ericsson.net (Postfix) with SMTP id 75C005C001
for <erlang-questi...@erlang.org>; Thu, 2 Aug 2012 14:05:43 +0200 (CEST)
Received: from [98.139.91.70] by nm3.bullet.mail.sp2.yahoo.com with NNFMP;
02 Aug 2012 12:05:42 -0000
Received: from [98.139.91.55] by tm10.bullet.mail.sp2.yahoo.com with NNFMP;
02 Aug 2012 12:05:42 -0000
Received: from [127.0.0.1] by omp1055.mail.sp2.yahoo.com with NNFMP;
02 Aug 2012 12:05:42 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 311578.33238...@omp1055.mail.sp2.yahoo.com
Received: (qmail 80480 invoked by uid 60001); 2 Aug 2012 12:05:42 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024;
t=1343909142; bh=n5bOzuKOuEdjhzJa9FDN8WzkQl6V0g5KU2UGO5H8y1Y=;
h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding;
b=sZ4Ljb+fTlQkD1gb3of6Lk4upT4v1xj1OxDvCMLvkRlz76OfP+296uQEqTuKgKMvTnn649c44NwtaCq0pDFmaMZv8IF0C+hZXoA/KMkAU7h1MZIVA74xMRusJZP/rIkXVdjivCw5OteELThpYc/VFd0Uou+Uj9xKxog2qegixsg=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com;
h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding;
b=EiYBuYrOcnCFLgTyRB1mWv3ZbOxTfRdnDH6cvEq2GQu376wGkMvb5EplsMqsutj2Qj2/4ftdxFkPYDTCJYj6SQ6MdksafEX60uQBhqgoOqmbpiRKjy4jPEFZzlmMIOA5kz0HIJa4iMJOxtItjrxM+VbSKxEr+S6ZEJIPdsnJoxw=;
X-YMail-OSG: JcbBMqAVM1nmLpSoAAwGcTrxySwE8sVdyDeiJvPXQ5ZPwHx
_PQ_5VZHISKHtXGBCo_HuEvCN5ZzzDt__GHX7O2LBb_17RHkLyS962ZzKEeG
yPaI6KRwEwUIzqwbT3Q8RBZ_oU.bZTCohJ.mPxIrWUsAVAFXBzTO7ZBwD4D7
zCv4YFhgmMGq.0KoNuop0K1H5ElYKjxNy6kXDUAGUNLgLVGzk7nO4rVaDFIL
qGNd68XpSTd.j68.qfNpjJ82V6vpLn6tZgv9wAODIHwPXfIl9BwFyEsLFoAW
F19mDwseyDg1vUH0vtTk2Vu0AHInfSZdqnY.kJpgdCNddieoGwxW7g7OM5xM
AcCrteWTeWibJ6Qg8JoeAfxn63_mm7Bm3vFrrY7a5Pij4G5AUsu8jj6wU6Nn
eV7_NquYTo6VDt2EwAnWWLvVtXiN4cVi71e4kzLpkXFkNYoYiCu7WlLQTZ2d
OFWdyrFYwSd.qXdcqY1gJcnCvsCggtQ--
Received: from [195.242.146.100] by web111404.mail.gq1.yahoo.com via HTTP;
Thu, 02 Aug 2012 05:05:41 PDT
X-Mailer: YahooMailWebService/0.8.120.356233
References: <CAANBt-roo9uFTsrZw2nFq0=_7Z=W-hFXYLNLnP1Phm_5+i2...@mail.gmail.com>
<5017C60F.1050...@gmail.com> <5017E5D5.2030...@gmail.com>
<CAKrexV+F3J_ngBdgcD9T-7==gHmFb66ZwvSfjoqXwGbYNd=...@mail.gmail.com>
<5018EB2B.5030...@gmail.com>
<1343846574.80867.YahooMail...@web111403.mail.gq1.yahoo.com>
<C0436E74-D50E-4D9B-A0CC-160ADA241...@cs.otago.ac.nz>
Message-ID: <1343909141.62398.YahooMail...@web111404.mail.gq1.yahoo.com>
Date: Thu, 2 Aug 2012 05:05:41 -0700 (PDT)
From: Thomas Lindgren <thomasl_erl...@yahoo.com>
To: "erlang-questi...@erlang.org" <erlang-questi...@erlang.org>
MIME-Version: 1.0
Subject: Re: [erlang-questions] correct terminology for referring to strings
X-BeenThere: erlang-questi...@erlang.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: Thomas Lindgren <thomasl_erl...@yahoo.com>
List-Id: General Erlang/OTP discussions <erlang-questions.erlang.org>
List-Unsubscribe: <http://erlang.org/mailman/options/erlang-questions>,
<mailto:erlang-questions-requ...@erlang.org?subject=unsubscribe>
List-Archive: <http://erlang.org/pipermail/erlang-questions>
List-Post: <mailto:erlang-questi...@erlang.org>
List-Help: <mailto:erlang-questions-requ...@erlang.org?subject=help>
List-Subscribe: <http://erlang.org/mailman/listinfo/erlang-questions>,
<mailto:erlang-questions-requ...@erlang.org?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Errors-To: erlang-questions-boun...@erlang.org
Sender: erlang-questions-boun...@erlang.org
It might well be a wooly-headed idea when you look at the details, and I co=
nfess to not being an expert in this area. The basic concept would be to wa=
rn when, for instance, you've entered your string literals in Latin-1 when =
the compiler or system options decree that you should use UTF8. I like the =
overall idea of not leaving encoding problems to the good will of external =
tools, but if it can't be detected reliably, then it's of course just dream=
ing.=A0
Another approach might be to use a heuristic tool a la xref to detect "susp=
icious" string literals. Not sure if that helps.
Best,
Thomas
----- Original Message -----
> From: Richard O'Keefe <o...@cs.otago.ac.nz>
> To: Thomas Lindgren <thomasl_erl...@yahoo.com>
> Cc: "erlang-questi...@erlang.org" <erlang-questi...@erlang.org>
> Sent: Thursday, August 2, 2012 3:28 AM
> Subject: Re: [erlang-questions] correct terminology for referring to stri=
ngs
> =
> =
> On 2/08/2012, at 6:42 AM, Thomas Lindgren wrote:
>> =
>>=A0 How about adding compiler warnings about string literals that do not =
obey
>>=A0 the designated encoding? (There should then, of course, be multiple =
> possibilities to choose from.)
>> =
> =
> What does this actually mean?
> =
> There is no byte sequence valid in UTF-8 that is not also
> valid in Latin-1.=A0 Yes, codes 128..159 are control characters,
> but nobody ever said that control characters weren't legal in
> strings.=A0 Checking the mappings that came with Unicode 4,
> there is no byte sequence valid in UTF-8 that is not also
> valid in ISO 8859-{1,2,4,5,9,10,13,14,15}, PC code pages
> 437, 737, 775, 850, 852, 885, 86[012356], and Apple Arabic,
> Central European, Croatian, Cyrillic, Farsi, Greek, Hebrew,
> Icelandic, Roman, Romanian, Squeak, and Turkish.
> =
> So I have no idea what "string literals that do not obey
> the designated encoding" means or how to operationalise it.
>
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions