Question

I need to prepend the BOM to a NamedBlobFile field on my Dexterity type to make Windows users happy, but leave the file in blobstorage intact.

What is the recommended way to hook into Zope's file streaming without changing the actual file on the filesystem?

Was it helpful?

Solution

I'd go a different direction:

  • Ban Notepad. Really, broken software is broken software, you can only go so far to fix it's shortcomings.

  • Save UTF-8 files with the BOM; U+FEFF means "ZERO WIDTH NO-BREAK SPACE", 'normal' software will mostly ignore it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top