Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion correct terminology for referring to strings
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Thomas Lindgren  
View profile  
 More options Aug 2 2012, 8:05 am
From: Thomas Lindgren <thomasl_erl...@yahoo.com>
Date: Thu, 2 Aug 2012 05:05:41 -0700 (PDT)
Local: Thurs, Aug 2 2012 8:05 am
Subject: Re: [erlang-questions] correct terminology for referring to strings

It might well be a wooly-headed idea when you look at the details, and I confess to not being an expert in this area. The basic concept would be to warn 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 dreaming. 

Another approach might be to use a heuristic tool a la xref to detect "suspicious" 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 strings

> On 2/08/2012, at 6:42 AM, Thomas Lindgren wrote:

>>  How about adding compiler warnings about string literals that do not obey
>>  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.  Yes, codes 128..159 are control characters,
> but nobody ever said that control characters weren't legal in
> strings.  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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.