A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-October/017877.html below:

[Python-Dev] Bug or feature? Unicode vs t#

[Python-Dev] Bug or feature? Unicode vs t#Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Thu, 11 Oct 2001 10:25:28 +0200
> So change the docs.  hexlify() hasn't changed, yet the result has.
> So long as Unicode objects support the buffer interface, the
> question is why they've changed how they respond to that interface.

Unicode objects haven't changed in their response to the buffer
interface. What has changed is how t# uses this interface.

AFAICT, the change has occured in version 2.59 of getargs.c, in
response to patch #426072. In 2.1.1, t# used to call the getcharbuffer
operation, now it calls the getreadbuffer function. 

For Unicode objects, these are different: getcharbuffer converts the
string using the default encoding into a character string, whereas
getreadbuffer returns a pointer to the internal representation
(depending on the platform, this makes 2 or 4 bytes per Unicode
character, and they may come out either little or big endian).

It seems that the problem is in the simplification attempted with said
patch.

Regards,
Martin




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4