On Aug 7, 2005, at 7:37 PM, Martin v. Löwis wrote: > Guido van Rossum wrote: > >>> If stdin, stdout and stderr go to a terminal, there already is a >>> default encoding (actually, there always is a default encoding on >>> these, as it falls back to the system encoding if its not a >>> terminal, >>> or if the terminal's encoding is not supported or cannot be >>> determined). >>> >> >> >> So there is. Wow! I never kew this. How does it work? Can we use this >> for writing to files to? >> > > On Unix, it uses nl_langinfo(CHARSET), which in turn looks at the > environment variables. > > On Windows, it uses GetConsoleCP()/GetConsoleOutputCP(). > > On Mac, I'm still searching for a way to determine the encoding of > Terminal.app. It's UTF-8 by default, I highly doubt many people bother to change it. -bob
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