<font face="courier new,monospace">Did you try to put a pdb in prcessInputs of ZPublisher/HTTPRequest, around line 642 where my code shows something like this:<br> 640 if flags & CONVERTED:<br> 641 try:<br>
642 if character_encoding:<br> 643 # We have a string with a specified character<br> 644 # encoding. This gets passed to the converter<br>
645 # either as unicode, if it can handle it, or<br> 646 # crunched back down to latin-1 if it can not.<br> 647 item = unicode(item,character_encoding)<br>
648 if hasattr(converter,'convert_unicode'):<br> 649 item = converter.convert_unicode(item)<br> 650 else:<br> 651 item = converter(<br>
652 item.encode(default_encoding))<br> 653 else:<br> 654 item = converter(item)<br> 655 <br> 656 # Flag potentially unsafe values<br>
657 if converter_type in ('string', 'required', 'text',<br> 658 'ustring', 'utext'):<br><br><br><br>...<br>
<br>The only place I can see where a default encoding gets changed is by the default-zpublisher-encoding from zope.conf<br></font><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 30, 2012 at 6:14 PM, Patrick Gerken <span dir="ltr"><<a href="mailto:patrick.gerken@computer.org" target="_blank">patrick.gerken@computer.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font face="courier new,monospace"><br></font><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">
On Fri, Nov 30, 2012 at 11:19 AM, Charlie Clark <span dir="ltr"><<a href="mailto:charlie.clark@clark-consulting.eu" target="_blank">charlie.clark@clark-consulting.eu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Patrick,<br>
<br>
Am 30.11.2012, 09:50 Uhr, schrieb Patrick Gerken <<a href="mailto:do3ccqrv@googlemail.com" target="_blank">do3ccqrv@googlemail.com</a>>:<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Add sentry logging with raven to the sites. Trigger an exception in both<br>
sites. With sentry you can not only see the traceback, but check the local<br>
variable of each frame. You can do the same with pdb of course but not so<br>
easily side by side to see where the local vars start to differ.<br>
I can give you access to my sentry server to send the logs to.<br>
</blockquote>
<br></div>
thanks for the tip. I've got Sentry and Raven running and reporting but I'm afraid I still can't see the difference. The posted form looks indentical in both cases. I can only assume that, as you first suggested, there is a difference lower down the stack which is causing one instance to decode the URL-encoded form to unicode and the other to encode it as UTF-8. How can I check this? locale.getdefaultlocale() reports ('de_DE', 'UTF8') for both.</blockquote>
</div><div><br>I don't understand why you see no difference in the stacktrace, but a difference with pdb in the end. Doesn't one instance show that the input is a string and the other that its unicode?<br>Do you see this until you extract it first from the request object?<br>
<br>You are not having one form saying fieldname:string and the other just fieldname?<br></div></div></div>
</blockquote></div><br></div>