diff options
author | Tim Hatch <tim@timhatch.com> | 2014-05-16 17:52:34 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2014-05-16 17:52:34 -0700 |
commit | 778edd1d5ff974b1d4084af964151d9f87f05efd (patch) | |
tree | e92c418a1396733ee5fd92b4ece42314b47be431 /pygments/util.py | |
parent | 97422c5ed7200eeb588cf07f3e63cd1a80016f15 (diff) | |
parent | 6a2d5f2126349eefac049953a410ffa8f3458c05 (diff) | |
download | pygments-778edd1d5ff974b1d4084af964151d9f87f05efd.tar.gz |
Merged in jambonrose/pygments-main (pull request #338)
Produce only unicode escape sequences in RTFs
Diffstat (limited to 'pygments/util.py')
-rw-r--r-- | pygments/util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pygments/util.py b/pygments/util.py index c302900f..5dc6981f 100644 --- a/pygments/util.py +++ b/pygments/util.py @@ -208,6 +208,11 @@ def looks_like_xml(text): # Python narrow build compatibility def _surrogatepair(c): + # Given a unicode character code + # with length greater than 16 bits, + # return the two 16 bit surrogate pair. + # From example D28 of: + # http://www.unicode.org/book/ch03.pdf return (0xd7c0 + (c >> 10), (0xdc00 + (c & 0x3ff))) def unirange(a, b): |