Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a79b2628
Commit
a79b2628
authored
Mar 14, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Pass flags to wine_utf8_wcstombs to allow supporting WC_ERR_INVALID_CHARS.
parent
e13c9cd6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
locale.c
dlls/kernel32/locale.c
+1
-1
rtlstr.c
dlls/ntdll/rtlstr.c
+1
-1
unicode.h
include/wine/unicode.h
+1
-1
utf8.c
libs/wine/utf8.c
+2
-2
utils.c
tools/wrc/utils.c
+2
-2
No files found.
dlls/kernel32/locale.c
View file @
a79b2628
...
...
@@ -1892,7 +1892,7 @@ INT WINAPI WideCharToMultiByte( UINT page, DWORD flags, LPCWSTR src, INT srclen,
/* fall through */
case
CP_UTF8
:
if
(
used
)
*
used
=
FALSE
;
/* all chars are valid for UTF-8 */
ret
=
wine_utf8_wcstombs
(
src
,
srclen
,
dst
,
dstlen
);
ret
=
wine_utf8_wcstombs
(
flags
,
src
,
srclen
,
dst
,
dstlen
);
break
;
default:
if
(
!
(
table
=
get_codepage_table
(
page
)))
...
...
dlls/ntdll/rtlstr.c
View file @
a79b2628
...
...
@@ -76,7 +76,7 @@ int ntdll_wcstoumbs(DWORD flags, const WCHAR* src, int srclen, char* dst, int ds
if
(
unix_table
)
return
wine_cp_wcstombs
(
unix_table
,
flags
,
src
,
srclen
,
dst
,
dstlen
,
defchar
,
used
);
if
(
used
)
*
used
=
0
;
/* all chars are valid for UTF-8 */
return
wine_utf8_wcstombs
(
src
,
srclen
,
dst
,
dstlen
);
return
wine_utf8_wcstombs
(
flags
,
src
,
srclen
,
dst
,
dstlen
);
}
/**************************************************************************
...
...
include/wine/unicode.h
View file @
a79b2628
...
...
@@ -86,7 +86,7 @@ extern int wine_cp_wcstombs( const union cptable *table, int flags,
extern
int
wine_cpsymbol_mbstowcs
(
const
char
*
src
,
int
srclen
,
WCHAR
*
dst
,
int
dstlen
);
extern
int
wine_cpsymbol_wcstombs
(
const
WCHAR
*
src
,
int
srclen
,
char
*
dst
,
int
dstlen
);
extern
int
wine_utf8_mbstowcs
(
int
flags
,
const
char
*
src
,
int
srclen
,
WCHAR
*
dst
,
int
dstlen
);
extern
int
wine_utf8_wcstombs
(
const
WCHAR
*
src
,
int
srclen
,
char
*
dst
,
int
dstlen
);
extern
int
wine_utf8_wcstombs
(
int
flags
,
const
WCHAR
*
src
,
int
srclen
,
char
*
dst
,
int
dstlen
);
extern
int
wine_compare_string
(
int
flags
,
const
WCHAR
*
str1
,
int
len1
,
const
WCHAR
*
str2
,
int
len2
);
extern
int
wine_get_sortkey
(
int
flags
,
const
WCHAR
*
src
,
int
srclen
,
char
*
dst
,
int
dstlen
);
...
...
libs/wine/utf8.c
View file @
a79b2628
...
...
@@ -58,8 +58,8 @@ inline static int get_length_wcs_utf8( const WCHAR *src, unsigned int srclen )
}
/* wide char to UTF-8 string conversion */
/* return -1 on dst buffer overflow */
int
wine_utf8_wcstombs
(
const
WCHAR
*
src
,
int
srclen
,
char
*
dst
,
int
dstlen
)
/* return -1 on dst buffer overflow
, -2 on invalid input char
*/
int
wine_utf8_wcstombs
(
int
flags
,
const
WCHAR
*
src
,
int
srclen
,
char
*
dst
,
int
dstlen
)
{
int
len
;
...
...
tools/wrc/utils.c
View file @
a79b2628
...
...
@@ -270,12 +270,12 @@ string_t *convert_string(const string_t *str, enum str_e type, int codepage)
{
ret
->
type
=
str_char
;
ret
->
size
=
cptable
?
wine_cp_wcstombs
(
cptable
,
0
,
str
->
str
.
wstr
,
str
->
size
,
NULL
,
0
,
NULL
,
NULL
)
:
wine_utf8_wcstombs
(
str
->
str
.
wstr
,
str
->
size
,
NULL
,
0
);
:
wine_utf8_wcstombs
(
0
,
str
->
str
.
wstr
,
str
->
size
,
NULL
,
0
);
ret
->
str
.
cstr
=
xmalloc
(
ret
->
size
+
1
);
if
(
cptable
)
wine_cp_wcstombs
(
cptable
,
0
,
str
->
str
.
wstr
,
str
->
size
,
ret
->
str
.
cstr
,
ret
->
size
,
NULL
,
NULL
);
else
wine_utf8_wcstombs
(
str
->
str
.
wstr
,
str
->
size
,
ret
->
str
.
cstr
,
ret
->
size
);
wine_utf8_wcstombs
(
0
,
str
->
str
.
wstr
,
str
->
size
,
ret
->
str
.
cstr
,
ret
->
size
);
ret
->
str
.
cstr
[
ret
->
size
]
=
0
;
}
else
if
(
str
->
type
==
str_unicode
)
...
...
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