[Python-ideas] Support WHATWG versions of legacy encodings
chris.barker at noaa.gov
Wed Jan 17 12:58:41 EST 2018
On Tue, Jan 16, 2018 at 9:30 PM, Stephen J. Turnbull <
turnbull.stephen.fw at u.tsukuba.ac.jp> wrote:
> In what context? WHAT-WG's encoding standard is *all about browsers*.
> If a codec is feeding text into a process that renders them all as
> glyphs for a human to look at, that's one thing. The codec doesn't
> want to fatal there, and the likely fallback glyph is something from
> the control glyphs block if even windows-125x doesn't have a glyph
> there. I guess it sort of makes sense.
sure it does -- and python is not a browser, and python itself has nothigni
visual -- but we sure want to be abel to write code that produces visual
representations of maybe messy text...
if you're feeding a program
> the codec has no idea when or how that's
> going to get interpreted.
sure -- which is why others have suggested that if WATWG is supported, then
it *should* only be used for encoding, not encoding. But we are supposed to
be consenting adults here -- I see no reason to prevent encoding -- maybe
it would be useful for testing???
(as with JSON data, which I believe is
> "supposed" to be UTF-8, but many developers use the legacy charsets
> they're used to and which are often embedded in the underlying
> databases etc, ditto XML),
OK -- if developers do the wrong thing, then they do the wrong thing -- we
can't prevent that!
And Python's lovely "text is unicode" model actually makes that hard to do
wong. But we do need a way to decode messy text, and then send it off to
JSON or whatever properly encoded.
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas