Message168378
| Author |
loewis |
| Recipients |
loewis, ncoghlan, ronaldoussoren, skrah |
| Date |
2012年08月16日.12:07:13 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1345118834.69.0.247405611513.issue15035@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
It's not back to the 3.2 behavior. In 3.3, Py_UNICODE is always equal to wchar_t, which is a 4-byte type on Darwin. However, CFString is based on UniChar, which is a 2-byte type.
That this worked in 3.2 was by accident - it would work only in "narrow" builds. Python's configure in 3.2 and before wouldn't default to using wchar_t on Darwin since it didn't consider wchar_t "usable", which in turn happened because wchar_t is signed on Darwin, but Py_UNICODE was understood to be unsigned.
Since it's too late to add an 'U' code to 3.3, as a work-around, you would have to use a 'H' array, and initialize it with map(ord, the_string)).
Chances are good that a proper UCS-2 array code gets added to 3.4. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年08月16日 12:07:15 | loewis | set | recipients:
+ loewis, ronaldoussoren, ncoghlan, skrah |
| 2012年08月16日 12:07:14 | loewis | set | messageid: <1345118834.69.0.247405611513.issue15035@psf.upfronthosting.co.za> |
| 2012年08月16日 12:07:14 | loewis | link | issue15035 messages |
| 2012年08月16日 12:07:13 | loewis | create |
|