H98 Text IO

Johan Tibell johan.tibell at gmail.com
Wed Feb 27 04:25:39 EST 2008


On Wed, Feb 27, 2008 at 1:06 AM, Duncan Coutts
<duncan.coutts at worc.ox.ac.uk> wrote:
>  As a data point, Java and python use "always locale" as default if you
>  don't specify an encoding when opening a text stream.
>
>  I think personally I'm coming round to the "always locale" point of
>  view. We already have no cross-platform consistency for text files
>  because of the lf vs cr/lf issue and we have no cross-implementation
>  consistency.

I think following Java and Python in this matter is a good idea and
leads to fewer surprises for developers. If you want files created on
one machine to work on another you have to be explicit about encoding.

-- Johan


More information about the Libraries mailing list