Xceed Zip Compression Library Documentation
UnicodeUsagePolicy property
Xceed Zip control reference > Xceed Zip control properties > UnicodeUsagePolicy property

Description

The UnicodeUsageProperty allows you to specify the default Unicode usage policy that will be applied to files that are added to the zip file.

Data type

xcdUnicodeUsagePolicy

Possible values

Value Meaning
xupAlways

Always use Unicode text regardless of content.

This is the default behavior.

xupNonASCIIOnly

Only use Unicode text if the text contains non-ASCII characters.

Since the text must be examined, there is a small performance penalty when this option is used.

Default value

xupAlways

Declaration (DLL API)  

UINT XzGetUnicodeUsagePolicy( HXCEEDZIP hZip )
void XzSetUnicodeUsagePolicy( HXCEEDZIP hZip, UINT uValue )

Remarks

This property affects the filenames and file comments for items added to a zip file. It does not affect the global zip file comment, which cannot be written as Unicode.

Each file is examined individually.

This property affects the behavior of the "TextEncoding" and "ExtraHeaders" properties.

If xupNonASCIIOnly is used and no non-ASCII data is detected for a particular file, the standard text encoding will be used regardless of the value specified to the TextEncoding property and the xehUnicode, xehUTF8Filename and xehUTF8Comment extra headers will not be written for that file.

Applicable methods

Zip, Convert

Applicable properties

TextEncoding, ExtraHeaders

 

See Also