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-May/014752.html below:

[Python-Dev] RE: Ill-defined encoding for CP875?

[Python-Dev] RE: Ill-defined encoding for CP875? [Python-Dev] RE: Ill-defined encoding for CP875?Tim Peters tim.one@home.com
Sun, 13 May 2001 14:31:42 -0400
[M.-A. Lemburg]
> ...
> The "right" thing to do here, is to simply remove cp875
> from the test for round-tripping.

I'm relieved you think so, since that's what I already did <wink>.

> It is not the only encoding which fails this test, but it's not
> our fault: the codecs were all generated from the original codec
> maps at the Unicode.org site.
>
> If their mappings are broken, we can't do much about it... other
> than to ignore the error or remove the codec altogether.

On general principle I don't like either of those -- "in the face of
ambiguity, refuse the temptation to guess".  It's at least surprising to see

>>> unicode("?", "cp875").encode("cp875")
'\xfd'
>>>

now, yes?  Would it be better if an ambiguous encoding raised an exception in
"strict" mode?  That is, a third choice is to alert users when they're
relying on a broken part of a mapping.




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