> Ok, I'm just using the wrong terminology. I'm aware that mbcs is used > for filename encoding on Windows (right?).
Not anymore, no. > The encoding I'm talking > about is the encoding that Python uses to decode a file (or encode a > string) when you do the following in Python 3: > > text = open(filename).read() > open(filename, 'w').write(some_string) > > It isn't the default encoding (always utf-8 by default in Python 3 > apparently), it isn't the file system encoding which is the system > encoding used for file names. What is the correct terminology for this > platform dependent encoding that Python uses here? I don't think there is an official term for it. I (alternatingly) call it the locale's encoding, or the user's preferred encoding. It's the encoding that the user (directly or indirectly) has asked applications to use for data in absence of a more specific requirement. > The important point is that it is platform dependent - so if you ship > and use text files with your Python application and don't specify an > encoding then it will work fine on some platforms and blow up or use the > wrong encoding on other platforms. Correct. Also, data output on some platform will be unreadable on some other platform. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com