@@ -3454,7 +3454,7 @@ def AppendFilesWithContent(infiles, fp, dirlistfromtxt=False, filevalues=[], ext
34543454 if ftype in data_types :
34553455 with open (fname , "rb" ) as fpc :
34563456 shutil .copyfileobj (fpc , fcontents )
3457- fencoding = GetFileEncoding (fcontents , True )
3457+ fencoding = GetFileEncoding (fcontents , False )
34583458 if (not compresswholefile ):
34593459 fcontents .seek (0 , 2 )
34603460 ucfsize = fcontents .tell ()
@@ -3609,7 +3609,7 @@ def AppendListsWithContent(inlist, fp, dirlistfromtxt=False, filevalues=[], extr
36093609 fheaderchecksumtype = curfname [25 ]
36103610 fcontentchecksumtype = curfname [26 ]
36113611 fcontents = curfname [27 ]
3612- fencoding = GetFileEncoding (fcontents , True )
3612+ fencoding = GetFileEncoding (fcontents , False )
36133613 catoutlist = [ftype , fencoding , fname , flinkname , fsize , fatime , fmtime , fctime , fbtime , fmode , fwinattributes , fcompression , fcsize ,
36143614 fuid , funame , fgid , fgname , fid , finode , flinkcount , fdev , fdev_minor , fdev_major , fseeknextfile ]
36153615 fcontents .seek (0 , 0 )
@@ -4882,7 +4882,7 @@ def PackArchiveFile(infiles, outfile, dirlistfromtxt=False, fmttype="auto", comp
48824882 if ftype in data_types :
48834883 with open (fname , "rb" ) as fpc :
48844884 shutil .copyfileobj (fpc , fcontents )
4885- fencoding = GetFileEncoding (fcontents , True )
4885+ fencoding = GetFileEncoding (fcontents , False )
48864886 if (not compresswholefile ):
48874887 fcontents .seek (0 , 2 )
48884888 ucfsize = fcontents .tell ()
@@ -5223,7 +5223,7 @@ def PackArchiveFileFromTarFile(infile, outfile, fmttype="auto", compression="aut
52235223 if ftype in data_types :
52245224 fpc = tarfp .extractfile (member )
52255225 shutil .copyfileobj (fpc , fcontents )
5226- fencoding = GetFileEncoding (fcontents , True )
5226+ fencoding = GetFileEncoding (fcontents , False )
52275227 if (not compresswholefile ):
52285228 fcontents .seek (0 , 2 )
52295229 ucfsize = fcontents .tell ()
@@ -5516,7 +5516,7 @@ def PackArchiveFileFromZipFile(infile, outfile, fmttype="auto", compression="aut
55165516 fcontents = BytesIO ()
55175517 if (ftype == 0 ):
55185518 fcontents .write (zipfp .read (member .filename ))
5519- fencoding = GetFileEncoding (fcontents , True )
5519+ fencoding = GetFileEncoding (fcontents , False )
55205520 if (not compresswholefile ):
55215521 fcontents .seek (0 , 2 )
55225522 ucfsize = fcontents .tell ()
@@ -5827,7 +5827,7 @@ def PackArchiveFileFromRarFile(infile, outfile, fmttype="auto", compression="aut
58275827 fcontents = BytesIO ()
58285828 if (ftype == 0 ):
58295829 fcontents .write (rarfp .read (member .filename ))
5830- fencoding = GetFileEncoding (fcontents , True )
5830+ fencoding = GetFileEncoding (fcontents , False )
58315831 if (not compresswholefile ):
58325832 fcontents .seek (0 , 2 )
58335833 ucfsize = fcontents .tell ()
@@ -6075,7 +6075,7 @@ def PackArchiveFileFromSevenZipFile(infile, outfile, fmttype="auto", compression
60756075 fcontents = BytesIO ()
60766076 if (ftype == 0 ):
60776077 fcontents .write (file_content [member .filename ].read ())
6078- fencoding = GetFileEncoding (fcontents , True )
6078+ fencoding = GetFileEncoding (fcontents , False )
60796079 fsize = format (fcontents .tell (), 'x' ).lower ()
60806080 file_content [member .filename ].close ()
60816081 if (not compresswholefile ):
@@ -7797,7 +7797,7 @@ def ListDirToArrayAlt(infiles, dirlistfromtxt=False, fmttype=__file_format_defau
77977797 with open (fname , "rb" ) as fpc :
77987798 shutil .copyfileobj (fpc , fcontents )
77997799 fcsize = fcontents .tell ()
7800- fencoding = GetFileEncoding (fcontents , True )
7800+ fencoding = GetFileEncoding (fcontents , False )
78017801 if (followlink and (ftype == 1 or ftype == 2 )):
78027802 flstatinfo = os .stat (flinkname )
78037803 with open (flinkname , "rb" ) as fpc :
@@ -8089,7 +8089,7 @@ def TarFileToArrayAlt(infile, fmttype=__file_format_default__, listonly=False, c
80898089 fpc = tarfp .extractfile (member )
80908090 shutil .copyfileobj (fpc , fcontents )
80918091 fcsize = fcontents .tell ()
8092- fencoding = GetFileEncoding (fcontents , True )
8092+ fencoding = GetFileEncoding (fcontents , False )
80938093 fcontents .seek (0 , 0 )
80948094 ftypehex = format (ftype , 'x' ).lower ()
80958095 extrafields = len (extradata )
@@ -8371,7 +8371,7 @@ def ZipFileToArrayAlt(infile, fmttype=__file_format_default__, listonly=False, c
83718371 if (ftype == 0 ):
83728372 fcontents .write (zipfp .read (member .filename ))
83738373 fcsize = fcontents .tell ()
8374- fencoding = GetFileEncoding (fcontents , True )
8374+ fencoding = GetFileEncoding (fcontents , False )
83758375 fcontents .seek (0 , 0 )
83768376 ftypehex = format (ftype , 'x' ).lower ()
83778377 extrafields = len (extradata )
@@ -8664,7 +8664,7 @@ def RarFileToArrayAlt(infile, fmttype=__file_format_default__, listonly=False, c
86648664 if (ftype == 0 ):
86658665 fcontents .write (rarfp .read (member .filename ))
86668666 fcsize = fcontents .tell ()
8667- fencoding = GetFileEncoding (fcontents , True )
8667+ fencoding = GetFileEncoding (fcontents , False )
86688668 fcontents .seek (0 , 0 )
86698669 ftypehex = format (ftype , 'x' ).lower ()
86708670 extrafields = len (extradata )
@@ -8902,7 +8902,7 @@ def SevenZipFileToArrayAlt(infile, fmttype=__file_format_default__, listonly=Fal
89028902 fsize = format (fcontents .tell (), 'x' ).lower ()
89038903 fileop .close ()
89048904 fcsize = fcontents .tell ()
8905- fencoding = GetFileEncoding (fcontents , True )
8905+ fencoding = GetFileEncoding (fcontents , False )
89068906 fcontents .seek (0 , 0 )
89078907 ftypehex = format (ftype , 'x' ).lower ()
89088908 extrafields = len (extradata )
@@ -9189,7 +9189,7 @@ def RePackArchiveFile(infile, outfile, fmttype="auto", compression="auto", compr
91899189 fcontents = listcatfiles ['ffilelist' ][reallcfi ]['fcontents' ]
91909190 if (not listcatfiles ['ffilelist' ][reallcfi ]['fcontentasfile' ]):
91919191 fcontents = BytesIO (fcontents )
9192- fencoding = GetFileEncoding (fcontents , True )
9192+ fencoding = GetFileEncoding (fcontents , False )
91939193 fcompression = ""
91949194 fcsize = format (int (0 ), 'x' ).lower ()
91959195 if (not compresswholefile ):
0 commit comments