What version of Unicode is your Perl using?
Most versions of Perl (v5.38, v5.40, and so on) updates the Unicode Character Database (UCD), and each version of the UCD has new features, often new blocks, characters, or adjustments to property settings. But, which version do you have?
I tried this task a long time ago, in some place I don’t remember, looking at the presence of properties and other things, but I don’t want to create a long chain of things to query to rule out versions. That’s just too much work if I can cheat.
First, the Unicode data files are embedded in the Perl distribution. Look for them in the *lib/
The version is in *lib/
$ perldoc -l unicore::Name No documentation found for “unicore::Name”.
Getting the right path is a bit weird because the path might be a symlink, so I need to get the final path:
$ which perl /Users/brian/bin/perl $ readlink -f $(which perl) /usr/local/perls/perl-5.42.0/bin/perl5.42.0 $ readlink -f $(which perl) | xargs perl -e ‘$ARGV[0] =~ s|bin/perl([^/]+)\z|lib/$1/unicore/version|; print scalar «»’ 16.0.0
That works, but is a bit annoying. There’s another way that took me a minute to discover; buried in Unicode::UCD is the UnicodeVersion function, all the way back to v5.8:
$ perl -MUnicode::UCD -E ‘say Unicode::UCD::UnicodeVersion()’ 16.0.0 $ perl5.8.9 -MUnicode::UCD -e ‘print Unicode::UCD::UnicodeVersion()’ 5.1.0
Finally, if you screw around with the stuff in unicore/, perhaps in an attempt to upgrade the UCD version in a perl installation, that’s on you. Don’t do that.
Now here’s the same thing for other languages:
$ python3 –version Python 3.10.6 $ python3 -c ‘import unicodedata; print(unicodedata.unidata_version)’ 13.0.0
$ ruby –version ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22] $ ruby -e ‘require “rbconfig”; puts RbConfig::CONFIG[“UNICODE_VERSION”]’ 15.0.0