fix: drhider _build_zip — ZipInfo UTF-8 flag for Cyrillic filenames (v1.7)
Deploy contracts-flask / validate (push) Successful in 0s

This commit is contained in:
2026-07-07 15:34:36 +04:00
parent 78c5503cfd
commit 54be17dad5
5 changed files with 36 additions and 4 deletions
+3 -1
View File
@@ -458,7 +458,9 @@ class TwoPassObfuscator:
buf = io.BytesIO()
with zipfile.ZipFile(buf, 'w', zipfile.ZIP_DEFLATED) as zf:
for fname, content in files:
zf.writestr(fname, content)
info = zipfile.ZipInfo(fname)
info.flag_bits |= 0x800 # UTF-8 filename
zf.writestr(info, content)
if mapping_csv:
zf.writestr("mapping.csv", '\ufeff'.encode('utf-8') + mapping_csv.encode('utf-8'))
return buf.getvalue()