[pyicu-dev] Bug in Python 4-byte to ICU UChar?
Jim Fulton
jim at zope.com
Wed Nov 30 12:54:14 PST 2005
Andi Vajda wrote:
>
> On Wed, 30 Nov 2005, Jim Fulton wrote:
>
>> Andi Vajda wrote:
>>
>>>
>> ...
>>
>>> Indeed, this is a bug. Is u_strFromUTF32() compatible with Python's 4
>>> byte unicode ? If so the fix should be simple. If not, what are the
>>> differences and how are they bridged ?
>>
>>
>> You're asking me? :)
>>
>> I'm as confident that 4-byte Python unicode is compatible with UChar32
>> as I am that 2-byte Python unicode is compatible with UChar, which is to
>> say about 90%. ;)
>
>
> With that 90% assumption in mind, I made the change you suggested. Since
> I'm not near a 4 byte unicode python installation (my mac's is 2 byte),
> could you please try the attached patch out ?
Um, sure. I found this through code inspection. I'll have to construct
a test case of some sort that fails without the patch and suceeds after
on a Python built with 4-byte unicode. Wish me luck. :)
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the pyicu-dev
mailing list