Giter VIP home page Giter VIP logo

Comments (3)

aaronsteers avatar aaronsteers commented on August 25, 2024 1

Agreed with making utf-8 the default. I don't think there's a strong need to require system-specific encoding (these things should be portable across OSes), but @edgarrmondragon's suggestion of passing an explicit null value would make sense to me. (More likely though we'd recommend them to send latin1 or another explicit encoding name.)

from tap-csv.

pnadolny13 avatar pnadolny13 commented on August 25, 2024

@visch thanks for opening this!

TIL that open() uses your machine's preferred encoding. I was expecting it to be something consistent under the hood but I see why this can be confusing because I think running the tap on the same file with same configs on two different machines could produce different outputs.

encoding is the name of the encoding used to decode or encode the file. This should only be used in text mode. The default encoding is platform dependent (whatever locale.getpreferredencoding() returns), but any text encoding supported by Python can be used. See the codecs module for the list of supported encodings.

After learning that I'd agree that choosing a default for ourselves in the tap is a good idea. But I'm not all that versed in this stuff, especially cross platform compatibility, so I'd like to hear others opinions.

from tap-csv.

edgarrmondragon avatar edgarrmondragon commented on August 25, 2024

UTF-8 would be a sane default. Users could still let Python use the system's encoding by configuring "encoding": null for each file.

from tap-csv.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.