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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top