srt.read: Read srt file

Description Usage Arguments See Also Examples

View source: R/main.R

Description

Read a srt file as a vector, if there is any encoding issue, try to save your srt fle as ANSI encoding using Windows Notepad.

Usage

1
srt.read(file, encoding = "utf-8")

Arguments

file

character. The name of the file which the subtitles are to be read from.

encoding

character. Encoding to be assumed for input strings, deafult is 'utf-8'.

See Also

readLines

Examples

1
2
3
# read a ANSI srt file
srt_path <- system.file("extdata", "movie.srt", package="SRTtools")
srt <- srt.read(srt_path, encoding = 'utf-8')

ChiHangChen/SRTtools documentation built on July 20, 2019, 3:50 p.m.