Unicode problem in ucs4

M.-A. Lemburg mal at egenix.com
Mon Mar 23 17:34:02 EDT 2009


On 2009-03-23 14:05, abhi wrote:
> Hi Marc,
>        Is there any way to ensure that wchar_t size would always be 2
> instead of 4 in ucs4 configured python? Googling gave me the
> impression that there is some logic written in PyUnicode_AsWideChar()
> which can take care of ucs4 to ucs2 conversion if sizes of Py_UNICODE
> and wchar_t are different.

wchar_t is defined by your compiler. There's no way to change that.

However, you can configure Python to use UCS2 (default) or UCS4 (used
on most Unix platforms), so it's easy to customize for your needs.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Mar 23 2009)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2009-03-19: Released mxODBC.Connect 1.0.1      http://python.egenix.com/

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/



More information about the Python-list mailing list