Re: Unicode support in Python 2.7.8 - 16 bit

2017-03-07 Thread Steven D'Aprano
On Tue, 07 Mar 2017 14:05:15 -0800, John Nagle wrote: > How do I test if a Python 2.7.8 build was built for 32-bit Unicode? sys.maxunicode will be 1114111 if it is a "wide" (32-bit) build and 65535 if it is a "narrow" (16-bit) build. You can double-check with: unichr(0x10) # will raise V

Re: Unicode support in Python 2.7.8 - 16 bit

2017-03-07 Thread Terry Reedy
On 3/7/2017 5:05 PM, John Nagle wrote: How do I test if a Python 2.7.8 build was built for 32-bit Unicode? (I'm dealing with shared hosting, and I'm stuck with their provided versions.) If I give this to Python 2.7.x: sy = u'\U0001f60f' len(sy) is 1 on a Ubuntu 14.04LTS machine, but 2

Re: Unicode support in Python 2.7.8 - 16 bit

2017-03-07 Thread Chris Angelico
On Wed, Mar 8, 2017 at 9:05 AM, John Nagle wrote: >How do I test if a Python 2.7.8 build was built for 32-bit > Unicode? (I'm dealing with shared hosting, and I'm stuck > with their provided versions.) > > If I give this to Python 2.7.x: > > sy = u'\U0001f60f' > > len(sy) is 1 on a Ubuntu

Unicode support in Python 2.7.8 - 16 bit

2017-03-07 Thread John Nagle
How do I test if a Python 2.7.8 build was built for 32-bit Unicode? (I'm dealing with shared hosting, and I'm stuck with their provided versions.) If I give this to Python 2.7.x: sy = u'\U0001f60f' len(sy) is 1 on a Ubuntu 14.04LTS machine, but 2 on the Red Hat shared hosting machine.