Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unicode version for python and debian 9

For unicode version in my debian9

ls   /usr/share/doc/unicode-data
changelog.Debian.gz  copyright

Extract changelog.Debian.gz,some version info such as below:

unicode-data (9.0-1) unstable; urgency=medium

  * New upstream release. Closes: #827098.
  * Move to Standards-Version: 3.9.6. No changes required.

 -- Alastair McKinstry <[email protected]>  Wed, 22 Jun 2016 14:49:26 +0100

unicode-data (8.0-3) unstable; urgency=medium

  * Fetch new allkeys.txt for Unicode 8. Closes: #809188.
  * Move to S-V: 3.9.6. No changes required.
  * Fix sort error in NameAliases.txt. Closes: #808465.

 -- Alastair McKinstry <[email protected]>  Tue, 29 Dec 2015 02:15:32 +0000

The unicode version for my debian9 is 9.0-1 ?

For unicode version in python3

>>> import unicodedata
>>> unicodedata.unidata_version
'8.0.0'

Does it mean that unicode version in my debian9 is 9.0-1 ,different from unicode version in my python3?

like image 308
showkey Avatar asked Apr 19 '18 02:04

showkey


1 Answers

Python doesn't use system unicodedata. It is compiled an existing set. If you check the below url

https://docs.python.org/3.5/library/unicodedata.html

This module provides access to the Unicode Character Database (UCD) which defines character properties for all Unicode characters. The data contained in this database is compiled from the UCD version 8.0.0.

and for Python 3.6.5

https://docs.python.org/3.6/library/unicodedata.html

This module provides access to the Unicode Character Database (UCD) which defines character properties for all Unicode characters. The data contained in this database is compiled from the UCD version 9.0.0.

So its just that your system python version is not on 3.6.X and that is why you see a 8.0.0

like image 93
Tarun Lalwani Avatar answered Oct 08 '22 12:10

Tarun Lalwani