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/2000-March/002702.html below:

[Python-Dev] Unicode and Windows

[Python-Dev] Unicode and WindowsJack Jansen jack@oratrix.nl
Wed, 22 Mar 2000 14:46:50 +0100
> > [on the user-supplies-buffer interface]
> > I think this would be much less error-prone than having fixed-length buffers
> > all over the place.
> 
> PyArg_ParseTuple() should probably raise an error in case the
> data doesn't fit into the buffer.

Ah, that's right, that solves most of that problem.

> > [on the malloced interface]
> Good point. You'll still need the buffer_len output parameter
> though -- otherwise you wouldn't be able tell the size of the
> allocated buffer (the returned data may not be terminated).

Are you sure? I would expect the "eS" format to be used to obtain 8-bit data 
in some local encoding, and I would expect that all 8-bit encodings of unicode 
data would still allow for null-termination. Or are there 8-bit encodings out 
there where a zero byte is normal occurrence and where it can't be used as 
terminator?
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm 





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