|
|
|
@ -3566,8 +3566,7 @@ class locked_file(object):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_filesystem_encoding():
|
|
|
|
|
encoding = sys.getfilesystemencoding()
|
|
|
|
|
return encoding if encoding is not None else 'utf-8'
|
|
|
|
|
return sys.getfilesystemencoding() or sys.getdefaultencoding() or 'utf-8'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def shell_quote(args):
|
|
|
|
@ -3576,6 +3575,11 @@ def shell_quote(args):
|
|
|
|
|
for a in args:
|
|
|
|
|
# We may get a filename encoded with 'encodeFilename'
|
|
|
|
|
a = _decode_compat_str(a, encoding)
|
|
|
|
|
if isinstance(a, bytes):
|
|
|
|
|
# We may get a filename encoded with 'encodeFilename'
|
|
|
|
|
a = a.decode(encoding)
|
|
|
|
|
if not encoding.lower().startswith('ut'):
|
|
|
|
|
a = a.encode('utf-8').decode('unicode-escape')
|
|
|
|
|
quoted_args.append(compat_shlex_quote(a))
|
|
|
|
|
return ' '.join(quoted_args)
|
|
|
|
|
|
|
|
|
@ -5065,7 +5069,7 @@ def dfxp2srt(dfxp_data):
|
|
|
|
|
continue
|
|
|
|
|
default_style.update(style)
|
|
|
|
|
|
|
|
|
|
for para, index in zip(paras, itertools.count(1)):
|
|
|
|
|
for index, para in enumerate(paras, 1):
|
|
|
|
|
begin_time = parse_dfxp_time_expr(para.attrib.get('begin'))
|
|
|
|
|
end_time = parse_dfxp_time_expr(para.attrib.get('end'))
|
|
|
|
|
dur = parse_dfxp_time_expr(para.attrib.get('dur'))
|
|
|
|
|