develooper Front page | perl.perl5.porters | Postings from May 2010

Re: Backwards compatibility breakage proposal for charnames::viacode

Thread Previous
May 30, 2010 10:27
Re: Backwards compatibility breakage proposal for charnames::viacode
Message ID:
On 30 May 2010 19:06, demerphq <> wrote:
> On 30 May 2010 00:22, karl williamson <> wrote:
>> viacode is supposed to return Unicode's name for the input ordinal.
>> The Unicode standard says that the name for any unassigned code point is the
>> empty string.  Perl returns undef instead.  My view is that we should change
>> to meet the standard, and return undef only for input above the maximum that
>> Unicode allows (0x10FFFF).
>> But since there is a possibility this could break existing code, I thought I
>> had better get others' opinions.  In the past, the Standard has had
>> precedence on issues like this.
> Seems to me like this would be a position they would take that would
> be portable across any language, and that for languages that have a
> concept of "undefined" it doesnt make much sense.
> For instance, would they make this suggestion for storing the table in
> an SQL database that supports NULL?

Thinking about this more, I think we are already compliant since
'undef' behaves like an empty string in string context, and any
warnings from using it are purely voluntary.

So unless the spec prohibits implementations from warning about using
such values, which seems unlikely, IMO what we do is the right thing.


perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About