develooper Front page | perl.perl5.porters | Postings from December 2012

Re: Comment period extended for Unicode's changing some common characters from Punctuation to Symbol

Thread Previous
From:
Tom Christiansen
Date:
December 2, 2012 18:29
Subject:
Re: Comment period extended for Unicode's changing some common characters from Punctuation to Symbol
Message ID:
740.1354472877@chthon
Karl Williamson <public@khwilliamson.com> wrote
   on Sun, 02 Dec 2012 09:21:37 MST: 
> On 12/01/2012 10:02 PM, Ricardo Signes wrote:

>> Do we want $Config{unicode_version} ?

> This information has long been available through 
> Unicode::UCD::UnicodeVersion()

Indeed.  I actually use it, too.  For example, in uninames,
where I now attach the "current" NamesList.txt file.  I emit
a warning if the version of the Unicode this Perl normally uses
is different from the one I include in the DATA segment.

--tom

    our $VERSION = "5.0 (2011-04-13)";
    our $Embedded_UCD_Version = qv(6.0.0);

  # ...

    sub read_nameslist() {
	my $real_UCD_version = Unicode::UCD::UnicodeVersion();

	if ($Embedded_UCD_Version ne $real_UCD_version) {
	    my $age = ($Embedded_UCD_Version lt $real_UCD_version)
			? "old"  : "future";
		warn sprintf "$0: using $age UCD %s; current is v%s\n", 
			$Embedded_UCD_Version, $real_UCD_version;
	    }

	die "no data: $!" unless defined fileno(DATA);
	binmode(DATA, "encoding(Latin-1)")  # stupid thing is iso-8859-1
	    || die "Can't binmode data: $!";
	local $/;
	return <DATA>;
    }

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About