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
Show 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 )
...
@@ -123,23 +123,23 @@ void LocaleDeinit( void )
static
char
*
MB2MB
(
const
char
*
string
,
UINT
fromCP
,
UINT
toCP
)
static
char
*
MB2MB
(
const
char
*
string
,
UINT
fromCP
,
UINT
toCP
)
{
{
char
*
out
;
char
*
out
;
int
ilen
=
strlen
(
string
),
olen
=
(
4
/
sizeof
(
wchar_t
))
*
ilen
+
1
;
wchar_t
*
wide
;
wchar_t
wide
[
olen
]
;
int
len
;
ilen
=
MultiByteToWideChar
(
fromCP
,
0
,
string
,
ilen
+
1
,
wide
,
olen
);
len
=
MultiByteToWideChar
(
fromCP
,
0
,
string
,
-
1
,
NULL
,
0
);
if
(
ilen
==
0
)
assert
(
len
>
0
);
wide
=
(
wchar_t
*
)
malloc
(
len
*
sizeof
(
wchar_t
));
if
(
wide
==
NULL
)
return
NULL
;
return
NULL
;
olen
=
4
*
ilen
+
1
;
MultiByteToWideChar
(
fromCP
,
0
,
string
,
-
1
,
wide
,
len
);
out
=
malloc
(
olen
);
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
);
WideCharToMultiByte
(
toCP
,
0
,
wide
,
-
1
,
out
,
len
,
NULL
,
NULL
);
if
(
olen
==
0
)
free
(
wide
);
{
return
out
;
free
(
out
);
return
NULL
;
}
return
realloc
(
out
,
olen
);
}
}
#endif
#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