mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[RAPPS] Fix CAB codepage handling (#7165)
- MultiByteToWide parameter bug. - Use CP_UTF8 to convert cab filenames if the UTF attribute is set.
This commit is contained in:
parent
7f0e8a3697
commit
a45d375f60
1 changed files with 3 additions and 2 deletions
|
@ -47,7 +47,7 @@ MultiByteToWide(const CStringA &szSource, CStringW &szDest, UINT Codepage)
|
|||
return FALSE;
|
||||
|
||||
// do the actual conversion
|
||||
sz = MultiByteToWideChar(CP_UTF8, 0, szSource, -1, szDest.GetBuffer(sz), sz);
|
||||
sz = MultiByteToWideChar(Codepage, 0, szSource, -1, szDest.GetBuffer(sz), sz);
|
||||
|
||||
szDest.ReleaseBuffer();
|
||||
return sz != 0;
|
||||
|
@ -160,7 +160,8 @@ FNFDINOTIFY(fnNotify)
|
|||
|
||||
// Append the destination directory to the file name.
|
||||
MultiByteToWide(pND->OutputDir, szExtractDir, CP_UTF8);
|
||||
MultiByteToWide(pfdin->psz1, szCabFileName, CP_ACP);
|
||||
UINT codepage = (pfdin->attribs & _A_NAME_IS_UTF) ? CP_UTF8 : CP_ACP;
|
||||
MultiByteToWide(pfdin->psz1, szCabFileName, codepage);
|
||||
|
||||
if (!NotifyFileExtractCallback(szCabFileName, pfdin->cb, pfdin->attribs,
|
||||
pND->Callback, pND->CallerCookie))
|
||||
|
|
Loading…
Reference in a new issue