Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
7375cdd8
Commit
7375cdd8
authored
Mar 14, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MB2MB and use it
parent
8353a94d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
src/text/unicode.c
src/text/unicode.c
+12
-16
No files found.
src/text/unicode.c
View file @
7375cdd8
...
...
@@ -62,15 +62,14 @@
# define ASSUME_UTF8 1
#endif
#ifndef ASSUME_UTF8
# if defined (HAVE_ICONV)
/* libiconv is more powerful than Win32 API (it has translit) */
# define USE_ICONV 1
# elif defined (WIN32) || defined (UNDER_CE)
# define USE_MB2MB 1
# else
# error No UTF8 charset conversion implemented on this platform!
# endif
#if defined (ASSUME_UTF8)
/* Cool */
#elif defined (WIN32) || defined (UNDER_CE)
# define USE_MB2MB 1
#elif defined (HAVE_ICONV)
# define USE_ICONV 1
#else
# error No UTF8 charset conversion implemented on this platform!
#endif
typedef
struct
locale_data_t
...
...
@@ -192,17 +191,14 @@ static char *locale_fast (const char *string, locale_data_t *p)
if
(
string
==
NULL
)
return
NULL
;
len
=
MultiByteToWideChar
(
p
->
fromCP
,
0
,
string
,
-
1
,
NULL
,
0
);
if
(
len
==
0
)
return
NULL
;
len
=
1
+
MultiByteToWideChar
(
p
->
fromCP
,
0
,
string
,
-
1
,
NULL
,
0
);
wchar_t
wide
[
len
];
MultiByteToWideChar
(
p
->
fromCP
,
0
,
string
,
-
1
,
wide
,
len
);
len
=
WideCharToMultiByte
(
p
->
toCP
,
0
,
wide
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
len
==
0
)
return
NULL
;
len
=
1
+
WideCharToMultiByte
(
p
->
toCP
,
0
,
wide
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
out
=
malloc
(
len
);
if
(
out
==
NULL
)
return
NULL
;
WideCharToMultiByte
(
p
->
toCP
,
0
,
wide
,
-
1
,
out
,
len
,
NULL
,
NULL
);
return
out
;
...
...
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