Unicode utf-8 doesn't do back-and-forth?
Martin v. Loewis
martin at v.loewis.de
Wed Jul 10 00:48:43 EDT 2002
sjmachin at lexicon.net (John Machin) writes:
> (1) Shouldn't you deduct the 2048 surrogates from the count?
Correct. Rounded to two decimal places, it would still be 4.09 bits.
> (2) Why did you round up to two decimal places and not zero decimal
> places? Can you buy 4.09 cans of beer?
To counter the impression that surrogates give you 5 additional bits,
which they don't. That they give 4 additional bits is much closer to
truth. I would by 4 cans of beer, and accept that I owe someone a drop
- especially since me and my guest won't drink more than 2 cans
tonight.
Regards,
Martin
More information about the Python-list
mailing list