This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients methane, ncoghlan, skrah, terry.reedy, vstinner
Date 2019-03-22.14:44:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553265861.92.0.134013163271.issue36299@roundup.psfhosted.org>
In-reply-to
Content
I think the problem is still whether to use 'u' == UCS2 and 'w' == UCS4 like in PEP-3118.

For the project I'm currently working on I'd need these for buffer exports:

>>> from xnd import *
>>> x = xnd(["abc", "xyz"], dtype="fixed_string(10, 'utf16')")
>>> y = xnd(["abc", "xyz"], dtype="fixed_string(10, 'utf32')")
>>> 
>>> memoryview(x)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: type is not supported by the buffer protocol


The use case is not an array that represents a single utf16 string, but
an array *of* fixed strings with different encodings.

So x would be exported with format 'u' and y with format 'w'.
History
Date User Action Args
2019-03-22 14:44:21skrahsetrecipients: + skrah, terry.reedy, ncoghlan, vstinner, methane
2019-03-22 14:44:21skrahsetmessageid: <1553265861.92.0.134013163271.issue36299@roundup.psfhosted.org>
2019-03-22 14:44:21skrahlinkissue36299 messages
2019-03-22 14:44:21skrahcreate