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
f3a6b7a8
Commit
f3a6b7a8
authored
Sep 10, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Sep 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm: Implement IMimeInternational_GetCodePageCharset.
parent
3dd46c36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
2 deletions
+51
-2
mimeintl.c
dlls/inetcomm/mimeintl.c
+51
-2
No files found.
dlls/inetcomm/mimeintl.c
View file @
f3a6b7a8
...
@@ -120,12 +120,61 @@ static HRESULT WINAPI MimeInternat_GetDefaultCharset(IMimeInternational *iface,
...
@@ -120,12 +120,61 @@ static HRESULT WINAPI MimeInternat_GetDefaultCharset(IMimeInternational *iface,
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
static
HRESULT
mlang_getcodepageinfo
(
UINT
cp
,
MIMECPINFO
*
mlang_cp_info
)
{
HRESULT
hr
;
IMultiLanguage
*
ml
;
hr
=
get_mlang
(
&
ml
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IMultiLanguage_GetCodePageInfo
(
ml
,
cp
,
mlang_cp_info
);
IMultiLanguage_Release
(
ml
);
}
return
hr
;
}
static
HRESULT
WINAPI
MimeInternat_GetCodePageCharset
(
IMimeInternational
*
iface
,
CODEPAGEID
cpiCodePage
,
static
HRESULT
WINAPI
MimeInternat_GetCodePageCharset
(
IMimeInternational
*
iface
,
CODEPAGEID
cpiCodePage
,
CHARSETTYPE
ctCsetType
,
CHARSETTYPE
ctCsetType
,
LPHCHARSET
phCharset
)
LPHCHARSET
phCharset
)
{
{
FIXME
(
"stub
\n
"
);
HRESULT
hr
;
return
E_NOTIMPL
;
MIMECPINFO
mlang_cp_info
;
TRACE
(
"(%p)->(%d, %d, %p)
\n
"
,
iface
,
cpiCodePage
,
ctCsetType
,
phCharset
);
*
phCharset
=
NULL
;
if
(
ctCsetType
<
CHARSET_BODY
||
ctCsetType
>
CHARSET_WEB
)
return
MIME_E_INVALID_CHARSET_TYPE
;
hr
=
mlang_getcodepageinfo
(
cpiCodePage
,
&
mlang_cp_info
);
if
(
SUCCEEDED
(
hr
))
{
const
WCHAR
*
charset_nameW
=
NULL
;
char
*
charset_name
;
DWORD
len
;
switch
(
ctCsetType
)
{
case
CHARSET_BODY
:
charset_nameW
=
mlang_cp_info
.
wszBodyCharset
;
break
;
case
CHARSET_HEADER
:
charset_nameW
=
mlang_cp_info
.
wszHeaderCharset
;
break
;
case
CHARSET_WEB
:
charset_nameW
=
mlang_cp_info
.
wszWebCharset
;
break
;
}
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
charset_nameW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
charset_name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
charset_nameW
,
-
1
,
charset_name
,
len
,
NULL
,
NULL
);
hr
=
IMimeInternational_FindCharset
(
iface
,
charset_name
,
phCharset
);
HeapFree
(
GetProcessHeap
(),
0
,
charset_name
);
}
return
hr
;
}
}
static
HRESULT
mlang_getcsetinfo
(
const
char
*
charset
,
MIMECSETINFO
*
mlang_info
)
static
HRESULT
mlang_getcsetinfo
(
const
char
*
charset
,
MIMECSETINFO
*
mlang_info
)
...
...
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