View Single Post
Old 02-29-2012, 02:00 PM   #310
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,627
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi,

Quote:
Originally Posted by frostschutz View Post
I don't use unzip -a because it could be damaging. After all there could be a perfectly good reason why a particular file uses/needs this style of newlines.

In the lib folder most files use unix newlines, except for scrolltextwidget.py and subasyncio.py. I don't think there is any intentional reason for it, merely an oversight.

Windows Python should be able to handle Unix \n newlines fine.
Using unzip -a on Mobi_Unpack_vXXX.zip is perfectly safe as it is a pure python implementation (all text files) and includes no binary files. That is why unzip has the -a option to begin with. And that is why I suggested you to use it.

Multiple people have developed these scripts on multiple platforms using multiple text editors and they will continue to do so. So some python files may end up as having \r\n at various points in time depending on what platform they were edited on last. So as I explained all you need do is unpack them properly using unzip -a and all will be well. Or use dos2unix as DiapDealer suggested.

KevinH
KevinH is offline   Reply With Quote