jruby / jcodings

Java-based codings helper classes for Joni and JRuby
MIT License
20 stars 29 forks source link

A way to access the Unicode version and the Unicode emoji version #29

Closed eregon closed 4 years ago

eregon commented 4 years ago

MRI reports both of these as RbConfig::CONFIG['UNICODE_VERSION'] and RbConfig::CONFIG['UNICODE_EMOJI_VERSION']. Is there a way to get those values from JCodings? I could not find one.

Maybe we could expose the version from scripts/generate.rb or the last age from https://github.com/jruby/jcodings/commit/549d6310f47fa8b6a5ab5f1803e5f1960c4a6524#diff-f7b7fcd9408309a7a3e666c1cc8c91b0 ?

lopex commented 4 years ago

yeah, so it should go to UnicodeProperties, any preference wrt the name ?

eregon commented 4 years ago

I would use the same as MRI, so UNICODE_VERSION and UNICODE_EMOJI_VERSION

headius commented 4 years ago

Relates to jruby/jruby#5576 and would fix two specs.

headius commented 4 years ago

I have hardcoded these in JRuby for now.

eregon commented 4 years ago

Thanks! As long as they're kept up-to-date with the version of Unicode JCodings implements this sounds a good approach.