[I18n-sig] Strawman Proposal: Binary Strings

Toby Dickenson tdickenson@geminidataloggers.com
Mon, 12 Feb 2001 08:11:55 +0000

On Sat, 10 Feb 2001 15:56:10 +0100, "M.-A. Lemburg" <mal@lemburg.com>

>Note that changing e.g. .encode('latin-1') to return a binary string
>doesn't really make sense, since here we know the encoding ! Instead,
>strings should probably carry along the encoding information in an
>additional attribute (it is not always useful, but can help in
>a few situations) provided that it is known.

To what use would that encoding attribute be put? surely not to
provide automatic encoding when these tagged strings interact with
unicode strings (Thats back towards the solution that I think we
already ruled out)

If .encode('latin1') or .encode('utf8') are going to return anything
tagged with an encoding, then surely it should be a tagged binary

Toby Dickenson