Binary or ascii file?
Quinn Dunkan
quinn at ngwee.ugcs.caltech.edu
Fri Sep 8 06:25:09 EDT 2000
More information about the Python-list mailing list
Fri Sep 8 06:25:09 EDT 2000
- Previous message (by thread): Binary or ascii file?
- Next message (by thread): Binary or ascii file?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 07 Sep 2000 17:58:35 +0200, Anders M Eriksson <anders.eriksson at morateknikutveckling.se> wrote: >Hello! > >Working on windows I need to know if the file I'm about to open is >binary or ascii. > >How can I find out which the file is? As far as I know, there is no way to know for sure, under unix or windows (or any os, even macos when creator isn't set). Programs that want to figure it out usually look for non-printable characters, and if there's a significant number of them, assume it's binary. This works pretty well, but can get confused when the locale of the text file you're reading has a different idea of what 'non-printable' is.
- Previous message (by thread): Binary or ascii file?
- Next message (by thread): Binary or ascii file?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list