Matt Wozniski writes:
Rather than introducing a new `open_utf8` function, I'd suggest the following:
- Deprecate calling `open` for text mode (the default) unless an
`encoding=` is specified,
For that, we should have a sentinel for "system default encoding" (as you acknowledge, but I want to foot-stomp it). The current dance to get that is quite annoying.
I think a __future__ import [of 'open_text' by some name] solves the problem better than introducing a new function would.
Only if you redefine the problem. If the problem is casual coders who want a quick-and-dirty ready-to-bake function to read UTF-8 when their default encodings are something else, then it's builtin or Just Don't -- teach them to copy-paste "encoding='utf-8'" FTW. I'm perfectly happy with "Just Don't" followed by "It's Time to Work on UTF-8 by Default". You'll have to ask Naoki how he feels about that.
Your proposal (1. above) is an interesting one for that.