Giter VIP home page Giter VIP logo

Comments (3)

byroot avatar byroot commented on June 21, 2024

For now I stated that guessing the encoding belongs to the application that use pysrt.

But now that you talk about it, it's silly because we already detect encoding through BOMs in the library and we also depends of chardet because of the srt command.

So I think it's a good idea. If you want to fill a pull request tell me, otherwise I'll do it in a few days.

Le 2012-12-08 à 14:31, Antoine Bertin [email protected] a écrit :

This could be used on a failed attempt to open a file due to UnicodeDecodeError. charade would be called to detect the encoding and a second attempt to open the file would be done.
This would be the default behavior and suppressed if encoding argument is not None.

What do you think?


Reply to this email directly or view it on GitHub.

from pysrt.

byroot avatar byroot commented on June 21, 2024

I can't figure out why but the python3 version of charade have trouble to detect BOM files.

It return me different variations of ISO encodings for my tests files.
The bug is also present in chardet2

I should fill an issue ...

For now it delay the pysrt3 release.

from pysrt.

byroot avatar byroot commented on June 21, 2024

Everything is green now.

from pysrt.

Related Issues (20)

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.