Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting codepage error #2

Closed
isarantis opened this issue Dec 11, 2015 · 10 comments
Closed

Getting codepage error #2

isarantis opened this issue Dec 11, 2015 · 10 comments

Comments

@isarantis
Copy link

Edit: Repo confusion.

@mafintosh
Copy link
Owner

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

@isarantis
Copy link
Author

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.

@mafintosh
Copy link
Owner

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

@isarantis
Copy link
Author

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.

@mafintosh
Copy link
Owner

Could you share a full example of what isn't working?
On Fri, 11 Dec 2015 at 11:49, Christos Sarantis notifications@github.com
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).

@isarantis
Copy link
Author

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
��� ���������� ����������
������������ ������� ���� �����.

@mafintosh
Copy link
Owner

try removing the encoding option

@isarantis
Copy link
Author

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

@isarantis
Copy link
Author

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

Thanks again

@mafintosh
Copy link
Owner

No worries. Glad you figured it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants