解决字幕乱码

许多实用脚本和封装函数, 可以让您编写脚本更加便捷高效

Moderators: tmplinshi, arcticir

arcticir
Posts: 644
Joined: 17 Nov 2013, 11:32

解决字幕乱码

15 Apr 2015, 07:57

Code: Select all

P:="F:\Memento.2000.Bluray.1080p.DTS-HD.x264-Grym.cht.srt"
FileRead,s,% "*P950 " P
FileDelete, % P
FileAppend , % s, % P ,UTF-8
tmplinshi
Posts: 1557
Joined: 01 Oct 2013, 14:57

Re: 解决字幕乱码

15 Apr 2015, 09:31

Code: Select all

srtFile := "F:\Memento.2000.Bluray.1080p.DTS-HD.x264-Grym.cht.srt"
reEncoding(srtFile, "CP950", "UTF-8") ; CP950 = 繁体

reEncoding(File, fromEncoding, toEncoding) {
	data := FileOpen(File, "r", fromEncoding).Read()
	FileOpen(File, "w", toEncoding).Write(data)
}

Return to “脚本函数”

Who is online

Users browsing this forum: No registered users and 2 guests