-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Marius Gedminas wrote:
On Tue, Sep 21, 2010 at 07:39:46PM +0100, Chris Withers wrote:
So, would anyone object if I change the default, on both trunk and the 2.12 branch to some variant of:
class BasicEncodingConflictResolver(object): implements(IUnicodeEncodingConflictResolver)
def resolve(self, context, text, expression): logging.warn('You should register an ' 'IUnicodeEncodingConflictResolver that matches ' 'your content') return text.decode('ascii','replace')
...and delete that devil spawn turd that is PreferredCharsetResolver?
If this means Zope2-the-application becomes unusable out of the box if you've non-ASCII data in your database, then I'm -1.
I also strongly object such a change in the default behavior. I did a lot of testing of the current implementation and configuration with various browsers and Zope applications and add-ons in order to make the Zope 3 ZPT engine in Zope 2 work out-of-the-box for most applications. However with the given constraints there will be always applications or bad written code or specific requirements were you need to change the resolver. That's why it is pluggable. There is is room for making the existing resolver smarter and more efficient: +1 for tuning the implementation but the proposed solution above does not solve anything and will break a bunch of apps. Andreas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJMmW78AAoJEADcfz7u4AZjs5MLv1TK/Y4gzX3SgnE0//ZPgx2g FSMcLkli2AT2//83U6w9NTDxre4OEkpfCZVaQbMGAdoooCPBcgLCV1Mvd44aVI7Q f6ff+1B22d+BxDEIJZOU05hFjJgxh4EQE7i8/wTVAoz+vq/HVbppXV5btu6Cyy9+ RsjdIUaqqIJ1FPDPAIG7BF+c2h+amcPZjoErN5/vxc4HSkNU4vOUG67bCh4Ea8eL 6RCiBT1Hr3zkNYGsdwc7m9fsTjz3jAi2o20qWCk0xeYaz0SQxvAkSPMrvbz3fL+P GMAaP5tU/ZBbUgIGD6OfUlrx1uaTeoNKRP1tA1FavQPXYaIuPUVoTXhV9c/5gp9h zZQbFQofSv8hX7PfDp3kGCiA11lBk6XAAiB7nO6PqdC/uDD1pqMuIa6h2Gzo71B6 kTTrKs2M9m7IKTwuq58SkGmJu7zUchnn7fcgXUjxv/T7z52tyN/rMemp5YaxG7O3 644kz3G4zelQpLeH5TOZwmaBcSWJ10g= =ZPTw -----END PGP SIGNATURE-----