Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
bcmatroska2
Commits
740696e4
Commit
740696e4
authored
2 years ago
by
Julien Wadel
1
Browse files
Options
Download
Patches
Plain Diff
Fix openning files with unicode filenames.
parent
5e974771
release/5.1
fix/yocyo_build_5_1
5.1.20
1 merge request
!17
Fix openning files with unicode filenames.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
corec/corec/helpers/file/file_bctbx_win32.c
+13
-1
corec/corec/helpers/file/file_bctbx_win32.c
with
13 additions
and
1 deletion
corec/corec/helpers/file/file_bctbx_win32.c
+
13
−
1
View file @
740696e4
...
...
@@ -115,8 +115,20 @@ static err_t Open(filestream* p, const tchar_t* URL, int Flags)
if
(
Flags
&
SFLAG_CREATE
)
mode
|=
O_CREAT
|
O_TRUNC
;
//TODO: verify it works with Unicode files too
//bctbx_file_open2 doesn't work with Unicode files
#ifdef UNICODE
char
fileStr
[
1024
];
memset
(
fileStr
,
0
,
1024
);
#ifdef _WIN32
WideCharToMultiByte
(
CP_ACP
,
0
,
URL
,
-
1
,
fileStr
,
sizeof
(
fileStr
),
0
,
0
);
#else
wcstombs
(
fileStr
,
URL
,
1024
);
#endif
p
->
fp
=
bctbx_file_open2
(
bctbx_vfs_get_default
(),
fileStr
,
mode
);
#else
p
->
fp
=
bctbx_file_open2
(
bctbx_vfs_get_default
(),
URL
,
mode
);
#endif
if
(
p
->
fp
==
NULL
)
{
if
((
Flags
&
(
SFLAG_REOPEN
|
SFLAG_SILENT
))
==
0
)
...
...
This diff is collapsed.
Click to expand it.
Julien Wadel
@julienw
mentioned in merge request
!19 (merged)
·
2 years ago
mentioned in merge request
!19 (merged)
mentioned in merge request !19
Toggle commit list
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets