11

I have a Python2.7 with UCS2 build installed on Ubuntu 12.10. I just want to recompile python with UCS4 or enable UCS4. How should I do this?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
comrad
  • 749
  • 1
  • 5
  • 13

1 Answers1

20

Use:

./configure --enable-unicode=ucs4

to configure the source to build with UCS4 support.

From the ./configure --help output:

  --enable-unicode[=ucs[24]]
                          Enable Unicode strings (default is ucs2)
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • 4
    yeah I read that, but where exactly do I type ./configure? Should I install a new python version? – comrad Oct 24 '13 at 20:41
  • 1
    I presumed you already knew how to compile packages; either install Python from source (with `--prefix=/usr/local` to not interfere with the system Python) or [build your own deb file from the original Ubuntu package](http://superuser.com/questions/24326/how-to-modify-a-deb-package). – Martijn Pieters Oct 24 '13 at 20:46