MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / ConvertToPrecomposed

Function ConvertToPrecomposed

Libraries/unrar/pathfn.cpp:976–985  ·  view source on GitHub ↗

Convert Unix, OS X and Android decomposed chracters to Windows precomposed.

Source from the content-addressed store, hash-verified

974
975// Convert Unix, OS X and Android decomposed chracters to Windows precomposed.
976void ConvertToPrecomposed(wchar *Name,size_t NameSize)
977{
978 wchar FileName[NM];
979 if (WinNT()>=WNT_VISTA && // MAP_PRECOMPOSED is not supported in XP.
980 FoldString(MAP_PRECOMPOSED,Name,-1,FileName,ASIZE(FileName))!=0)
981 {
982 FileName[ASIZE(FileName)-1]=0;
983 wcsncpyz(Name,FileName,NameSize);
984 }
985}
986
987
988// Remove trailing spaces and dots in file name and in dir names in path.

Callers 1

ConvertFileHeaderMethod · 0.85

Calls 2

WinNTFunction · 0.85
wcsncpyzFunction · 0.85

Tested by

no test coverage detected