Learn R Programming

SRTtools (version 1.2.0)

srt.read: Read srt file

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

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

Run this code
# NOT RUN {
# read a ANSI srt file
srt_path <- system.file("extdata", "movie.srt", package="SRTtools")
srt <- srt.read(srt_path, encoding = 'utf-8')



# }

Run the code above in your browser using DataLab