New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持 `U+20000 ~ U+2FA1F` 区间内的汉字 #33

Merged
merged 3 commits into from Jan 2, 2016

Conversation

Projects
None yet
1 participant
@mozillazg
Owner

mozillazg commented Jan 2, 2016

在如下两种情况下,len(u'\U00020000') == 1。所以再次开启对 U+20000 ~ U+2FA1F 区间内汉字的支持:

  • Python 3.3 以下版本:编译时启用了 UCS-4 支持 ./configure --enable-unicode=ucs4
  • Python 3.3 及以上版本默认支持 UCS-4

参考资料:

mozillazg added some commits Jan 2, 2016

fix "sre_constants.error: bad character range"
when the python interpreter doesn't support UCS-4

mozillazg added a commit that referenced this pull request Jan 2, 2016

Merge pull request #33 from mozillazg/feature/support-ucs4
支持 `U+20000 ~ U+2FA1F` 区间内的汉字

@mozillazg mozillazg merged commit 5db57da into develop Jan 2, 2016

2 of 3 checks passed

coverage/coveralls Coverage decreased (-0.4%) to 98.8%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@mozillazg mozillazg deleted the feature/support-ucs4 branch Jan 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment