Hi,
I'm running into 2 issues after upgrading to v23.01
As the files I need to output require me to set Posix Attributes aswell as Windows ones I used the kpidAttrib to pass a properly manipulated dword to via the GetProperty Call i recall this working with an earlier version but am currently unsure which excatly that was
If I use the SetProperty method to force UTF-8 my expectation would be that in CHandler::UpdateItems ui.isUtf8 would be set to true regardless of if the name is nonlatin or not however this is not the case. Is this the intended way of achieving this or am I missing something here?
Thank you for any insights,
posix atrributes can be stored in high 16-bits part with additional flag
(1 << 15)
in low part.IsUtf8
is internal variable. You have no access to it. So don't care about it.If something doesn't work as expcted, then describe that case.
Last edit: Igor Pavlov 2023-10-16
So if I'm setting the attrib to for example
InputFileAtttrib | 0x81A40000 | (1<<15)
I should expect the entry to have both Windows as well as POSIX attribs then?
Because somehow the Attribute gets overriden in
Update2St>UpdatePropsFromStream
back to what I assume is the Files On disk attributesSo passing "cu" to SetProperties does not enforce UTF-8 encoding for filenames?
7-Zip also asks attributes from open file stream:
in
FileStreams.cpp
:We don't need utf8 for usual latin characters.
Actually there are 2 ways to write utf-8 in zip:
utf-8 flag and utf-8 extra.
7-Zip uses utf-8 extra, because it provides more compatibility with old zip software.
Last edit: Igor Pavlov 2023-10-17
Oh I see so I need an
ISequentialInStream
that overloads GetProps/ReloadPropsNow I understand the utf-8 thing
Thanks for the help
or you can just not implement:
7-Zip uses these additional interfaces, because in some rare cases the properties from open file differ from properties that are received in scan stage.
Also note that there is
kpidPosixAttrib
.You must provide it, if you write to
TAR
archive.Last edit: Igor Pavlov 2023-10-17
That's a way easier solution Thanks!
Good to know!
Again thank you very much!