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
48c36db4
Commit
48c36db4
authored
Nov 06, 2014
by
Huw Davies
Committed by
Alexandre Julliard
Nov 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang: Accept "ascii" as an alias for "us-ascii".
parent
3069e0c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
mlang.c
dlls/mlang/mlang.c
+12
-1
mlang.c
dlls/mlang/tests/mlang.c
+12
-0
No files found.
dlls/mlang/mlang.c
View file @
48c36db4
...
@@ -65,6 +65,7 @@ typedef struct
...
@@ -65,6 +65,7 @@ typedef struct
const
char
*
web_charset
;
const
char
*
web_charset
;
const
char
*
header_charset
;
const
char
*
header_charset
;
const
char
*
body_charset
;
const
char
*
body_charset
;
const
WCHAR
*
alias
;
}
MIME_CP_INFO
;
}
MIME_CP_INFO
;
/* These data are based on the codepage info in libs/unicode/cpmap.pl */
/* These data are based on the codepage info in libs/unicode/cpmap.pl */
...
@@ -363,6 +364,9 @@ static const MIME_CP_INFO vietnamese_cp[] =
...
@@ -363,6 +364,9 @@ static const MIME_CP_INFO vietnamese_cp[] =
MIMECONTF_MIME_LATEST
,
MIMECONTF_MIME_LATEST
,
"windows-1258"
,
"windows-1258"
,
"windows-1258"
}
"windows-1258"
,
"windows-1258"
,
"windows-1258"
}
};
};
static
const
WCHAR
asciiW
[]
=
{
'a'
,
's'
,
'c'
,
'i'
,
'i'
,
0
};
static
const
MIME_CP_INFO
western_cp
[]
=
static
const
MIME_CP_INFO
western_cp
[]
=
{
{
{
"IBM EBCDIC (US-Canada)"
,
{
"IBM EBCDIC (US-Canada)"
,
...
@@ -415,7 +419,7 @@ static const MIME_CP_INFO western_cp[] =
...
@@ -415,7 +419,7 @@ static const MIME_CP_INFO western_cp[] =
20127
,
MIMECONTF_MAILNEWS
|
MIMECONTF_IMPORT
|
MIMECONTF_EXPORT
|
20127
,
MIMECONTF_MAILNEWS
|
MIMECONTF_IMPORT
|
MIMECONTF_EXPORT
|
MIMECONTF_SAVABLE_MAILNEWS
|
MIMECONTF_VALID
|
MIMECONTF_SAVABLE_MAILNEWS
|
MIMECONTF_VALID
|
MIMECONTF_VALID_NLS
|
MIMECONTF_MIME_LATEST
,
MIMECONTF_VALID_NLS
|
MIMECONTF_MIME_LATEST
,
"us-ascii"
,
"us-ascii"
,
"us-ascii"
},
"us-ascii"
,
"us-ascii"
,
"us-ascii"
,
asciiW
},
{
"Western European (ISO)"
,
{
"Western European (ISO)"
,
28591
,
MIMECONTF_MAILNEWS
|
MIMECONTF_BROWSER
|
MIMECONTF_IMPORT
|
28591
,
MIMECONTF_MAILNEWS
|
MIMECONTF_BROWSER
|
MIMECONTF_IMPORT
|
MIMECONTF_SAVABLE_MAILNEWS
|
MIMECONTF_SAVABLE_BROWSER
|
MIMECONTF_SAVABLE_MAILNEWS
|
MIMECONTF_SAVABLE_BROWSER
|
...
@@ -2600,6 +2604,13 @@ static HRESULT WINAPI fnIMultiLanguage3_GetCharsetInfo(
...
@@ -2600,6 +2604,13 @@ static HRESULT WINAPI fnIMultiLanguage3_GetCharsetInfo(
strcpyW
(
pCharsetInfo
->
wszCharset
,
csetW
);
strcpyW
(
pCharsetInfo
->
wszCharset
,
csetW
);
return
S_OK
;
return
S_OK
;
}
}
if
(
mlang_data
[
i
].
mime_cp_info
[
n
].
alias
&&
!
lstrcmpiW
(
Charset
,
mlang_data
[
i
].
mime_cp_info
[
n
].
alias
))
{
pCharsetInfo
->
uiCodePage
=
mlang_data
[
i
].
family_codepage
;
pCharsetInfo
->
uiInternetEncoding
=
mlang_data
[
i
].
mime_cp_info
[
n
].
cp
;
strcpyW
(
pCharsetInfo
->
wszCharset
,
mlang_data
[
i
].
mime_cp_info
[
n
].
alias
);
return
S_OK
;
}
}
}
}
}
...
...
dlls/mlang/tests/mlang.c
View file @
48c36db4
...
@@ -696,6 +696,17 @@ static void test_EnumCodePages(IMultiLanguage2 *iML2, DWORD flags)
...
@@ -696,6 +696,17 @@ static void test_EnumCodePages(IMultiLanguage2 *iML2, DWORD flags)
IEnumCodePage_Release
(
iEnumCP
);
IEnumCodePage_Release
(
iEnumCP
);
}
}
static
void
test_GetCharsetInfo_alias
(
IMultiLanguage
*
ml
)
{
WCHAR
asciiW
[]
=
{
'a'
,
's'
,
'c'
,
'i'
,
'i'
,
0
};
MIMECSETINFO
info
;
HRESULT
hr
;
hr
=
IMultiLanguage_GetCharsetInfo
(
ml
,
asciiW
,
&
info
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
info
.
wszCharset
,
asciiW
),
"got %s
\n
"
,
wine_dbgstr_w
(
info
.
wszCharset
));
}
static
void
scriptinfo_cmp
(
SCRIPTINFO
*
sinfo1
,
SCRIPTINFO
*
sinfo2
)
static
void
scriptinfo_cmp
(
SCRIPTINFO
*
sinfo1
,
SCRIPTINFO
*
sinfo2
)
{
{
ok
(
sinfo1
->
ScriptId
==
sinfo2
->
ScriptId
,
"ScriptId mismatch: %d != %d
\n
"
,
sinfo1
->
ScriptId
,
sinfo2
->
ScriptId
);
ok
(
sinfo1
->
ScriptId
==
sinfo2
->
ScriptId
,
"ScriptId mismatch: %d != %d
\n
"
,
sinfo1
->
ScriptId
,
sinfo2
->
ScriptId
);
...
@@ -2000,6 +2011,7 @@ START_TEST(mlang)
...
@@ -2000,6 +2011,7 @@ START_TEST(mlang)
test_GetNumberOfCodePageInfo
((
IMultiLanguage2
*
)
iML
);
test_GetNumberOfCodePageInfo
((
IMultiLanguage2
*
)
iML
);
test_IMLangConvertCharset
(
iML
);
test_IMLangConvertCharset
(
iML
);
test_GetCharsetInfo_alias
(
iML
);
IMultiLanguage_Release
(
iML
);
IMultiLanguage_Release
(
iML
);
...
...
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