From 5d1c76647c795f485288fe91f3f365c66b854034 Mon Sep 17 00:00:00 2001
From: Alexander Strasser <eclipse7@gmx.net>
Date: Sun, 7 May 2017 23:03:56 +0200
Subject: [PATCH] HACK: sub: Partially support non-ASCII external subs on
Windows
* Will only work for external subtitle file names in your local code page
* Works only with the one-liner because stream_file on windows falls back
to _sopen (otherwise we would have to re-code the directory entry's name)
---
sub/subreader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sub/subreader.c b/sub/subreader.c
index d57856b..a3f8fbe 100644
|
a
|
b
|
static void append_dir_subtitles(struct sub_list *slist, const char *path,
|
| 1990 | 1990 | len = (strlen(fname) > 256 ? strlen(fname) : 256) |
| 1991 | 1991 | + (strlen(path) > 256 ? strlen(path) : 256) + 2; |
| 1992 | 1992 | |
| 1993 | | f_fname = strdup(mp_basename(fname)); |
| | 1993 | f_fname = utf8_to_local_windows_code_page(mp_basename(fname)); |
| 1994 | 1994 | f_fname_noext = malloc(len); |
| 1995 | 1995 | f_fname_trim = malloc(len); |
| 1996 | 1996 | |