New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:

There are several problems with _msi.FCICreate() used to create the CAB file. 
It encodes the CAB names and added file names to UTF-8 and then use them as 
encoded with the local encoding. So you cannot create a CAB file in a directory 
with non-ASCII name or add files from a directory with non-ASCII name. This is 
a Python 3 regression.

Two possible solutions:

1. Encode paths with the locale encoding. It will add support for paths 
encodable with the locale encoding.

2. Encode them to UTF-8, but use a wrapper for opening file which converts the 
path from UTF-8 to UTF-16 and uses the Unicode variant of _open(). It will 
support arbitrary names.

----------
components: Windows
messages: 372466
nosy: paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: msilib.CAB doesnot support non-ASCII files
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41142>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to