Message168379
| Author |
ronaldoussoren |
| Recipients |
loewis, ncoghlan, ronaldoussoren, skrah |
| Date |
2012年08月16日.12:09:00 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1345118941.58.0.634028657272.issue15035@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Py_UNICODE is an typedef for wchar_t and that type is 4 bytes long:
>>> a.tobytes()
b'h\x00\x00\x00e\x00\x00\x00l\x00\x00\x00l\x00\x00\x00o\x00\x00\x00 \x00\x00\x00w\x00\x00\x00o\x00\x00\x00r\x00\x00\x00l\x00\x00\x00d\x00\x00\x00'
>>> a = array.array('u', 'bar')
>>> a.tobytes()
b'b\x00\x00\x00a\x00\x00\x00r\x00\x00\x00'
>>> len(a.tobytes())
12
>>>
This is with a checkout that was created yesterday.
The issue is not resolved, there now is no way to easily create a UCS2 buffer; while there was in earlier releases of Python (with the default narrow build) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年08月16日 12:09:01 | ronaldoussoren | set | recipients:
+ ronaldoussoren, loewis, ncoghlan, skrah |
| 2012年08月16日 12:09:01 | ronaldoussoren | set | messageid: <1345118941.58.0.634028657272.issue15035@psf.upfronthosting.co.za> |
| 2012年08月16日 12:09:00 | ronaldoussoren | link | issue15035 messages |
| 2012年08月16日 12:09:00 | ronaldoussoren | create |
|