Git Product home page Git Product logo

Comments (10)

mafintosh avatar mafintosh commented on August 28, 2024

I think you meant to open this issue on a different repo? My module is called srt-to-vtt, not srt2vtt

from srt-to-vtt.

isarantis avatar isarantis commented on August 28, 2024

Oh, yes sorry about that the problem i was having with yours was with the encoding eventualy after passing the files throu the converter i couldn't get ex: greek characters..

Sorry about that my mistake i edited the post.

from srt-to-vtt.

mafintosh avatar mafintosh commented on August 28, 2024

Hmm I'm a bit more confused now? Are you it didnt work with my module? Otherwise could you close this?

from srt-to-vtt.

isarantis avatar isarantis commented on August 28, 2024

I tryied working with your module but the problem i was getting was with utf8 encoded files. The encoding broke no matter using encoding options on readfile and write.

Thanks in advance, sorry for the confusion about the first post.

from srt-to-vtt.

mafintosh avatar mafintosh commented on August 28, 2024

Could you share a full example of what isn't working?
On Fri, 11 Dec 2015 at 11:49, Christos Sarantis [email protected]
wrote:

I tryied working with your module but the problem i was getting was with
utf8 encoded files. The encoding broke no matter using encoding options on
readfile and write.

Thanks in advance, sorry for the confusion about the first post.


Reply to this email directly or view it on GitHub
#2 (comment).

from srt-to-vtt.

isarantis avatar isarantis commented on August 28, 2024

Using your example:
var srt2vtt = require('srt-to-vtt')
var fs = require('fs')

fs.createReadStream('subs.srt', {encoding: 'utf-8'})
.pipe(srt2vtt())
.pipe(fs.createWriteStream('subs.vtt'), {encoding: 'utf-8'})

From: subs.srt:
2
00:00:17,531 --> 00:00:20,697
στη μεγαλύτερη ιστοσελίδα
διαμοιρασμού αρχείων στον κόσμο.

To subs.vtt:
00:00:17.531 --> 00:00:20.697
��� ���������� ����������
������������ ������� ���� �����.

from srt-to-vtt.

mafintosh avatar mafintosh commented on August 28, 2024

try removing the encoding option

from srt-to-vtt.

isarantis avatar isarantis commented on August 28, 2024

Tryed both removing encoding option from read and write, but also on both but the result was the same.
ps: the srt is utf8

from srt-to-vtt.

isarantis avatar isarantis commented on August 28, 2024

I fixed the error, i was beeing dumb once again and adding wrong encoding to the initial file.

Thanks again

from srt-to-vtt.

mafintosh avatar mafintosh commented on August 28, 2024

No worries. Glad you figured it out!

from srt-to-vtt.

Related Issues (7)

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.