Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
5243d4df
Commit
5243d4df
authored
Feb 14, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Safer Win32 code page translation
parent
1ea3602b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
src/misc/unicode.c
src/misc/unicode.c
+13
-13
No files found.
src/misc/unicode.c
View file @
5243d4df
...
...
@@ -123,23 +123,23 @@ void LocaleDeinit( void )
static
char
*
MB2MB
(
const
char
*
string
,
UINT
fromCP
,
UINT
toCP
)
{
char
*
out
;
int
ilen
=
strlen
(
string
),
olen
=
(
4
/
sizeof
(
wchar_t
))
*
ilen
+
1
;
wchar_t
wide
[
olen
]
;
wchar_t
*
wide
;
int
len
;
ilen
=
MultiByteToWideChar
(
fromCP
,
0
,
string
,
ilen
+
1
,
wide
,
olen
);
if
(
ilen
==
0
)
len
=
MultiByteToWideChar
(
fromCP
,
0
,
string
,
-
1
,
NULL
,
0
);
assert
(
len
>
0
);
wide
=
(
wchar_t
*
)
malloc
(
len
*
sizeof
(
wchar_t
));
if
(
wide
==
NULL
)
return
NULL
;
olen
=
4
*
ilen
+
1
;
out
=
malloc
(
olen
);
MultiByteToWideChar
(
fromCP
,
0
,
string
,
-
1
,
wide
,
len
);
len
=
WideCharToMultiByte
(
toCP
,
0
,
wide
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
assert
(
len
>
0
);
out
=
malloc
(
len
);
olen
=
WideCharToMultiByte
(
toCP
,
0
,
wide
,
ilen
,
out
,
olen
,
NULL
,
NULL
);
if
(
olen
==
0
)
{
free
(
out
);
return
NULL
;
}
return
realloc
(
out
,
olen
);
WideCharToMultiByte
(
toCP
,
0
,
wide
,
-
1
,
out
,
len
,
NULL
,
NULL
);
free
(
wide
);
return
out
;
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment