Re: [Zope-dev] Another weird unicode error from Zope 2
Am 13.10.2010, 12:57 Uhr, schrieb Chris Withers : > I don't have one set. > So, is iso-8859-15 the default in Zope 2.12? If so, why on earth that > rather than utf-8? See Zope2/Statup/zopeschema.xml This key controls what character set is used to encode unicode data that reaches ZPublisher without any other specified encoding. iso-8859-15 As to why it is iso-8859-anything as opposed to utf-8 is presumably because it has historically been the case. I don't know what would break if this would change. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Another weird unicode error from Zope 2
On 13/10/2010 11:10, Charlie Clark wrote: > Am 13.10.2010, 12:06 Uhr, schrieb Chris Withers: > >> So why on earth is iso8859_15 being picked instead of utf-8? > > I would guess this is the default-publisher-encoding of your system. I don't have one set. So, is iso-8859-15 the default in Zope 2.12? If so, why on earth that rather than utf-8? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Another weird unicode error from Zope 2
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Withers wrote: > On 12/10/2010 16:00, Charlie Clark wrote: >> Traceback (most recent call last): >> File "", line 1, in >> UnicodeEncodeError: 'latin-1' codec can't encode character u'\u203a' in >> position 0: ordinal not in range(256) >> >> ISO-8859-15 is, of course, Latin-1 + the € > > Yes, but I don't see why that is being used... I assume you are familar with pdb in order to figure it out. Andreas -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJMtYpYAAoJEADcfz7u4AZjgOALwJQ+ml/tJXf/0ARIFZ+8OgDA nQ3NT9w4NPZ7o3/Fo1xq5FzOV5reTka2vqWPiEW59ANUy2zZp7lHbSKGTh6qn6LB dOEHn5MwOSYhmPEm3L3sNiwzfXSkwj5rPnSwdIkL/UL9tCAG7uMF4wIyEuNQPcVO PcQAvvh6cX9ew7P3kmry2JR2EfsmKxo2N+fD/WjnuFSWWxK3dRv0mVGzL+3M3/uA n0QwWLlNQhfx9jbz4SggQX80E8q8qp9QIuPgtBhDmkswAnTmnoJ0snqOxm/jweXx k7cu8KNgZ1Tq35+W7KHB+U+DauG8r64H8PA021M0Ppomr8Pdvd+WA3U5C1zH/M1c M+frBUcO0yuO6IO3vbZUM6LBLtllx2/+MLUnBA3IqzOT3vBOjjLY05LGlbSehPqn MzTrio7hzigPG2PH1Y1xPP2nDwuoI3obyGpHxHt8YQQL3z/MX4Hx1qQ/+V+5YVyW 4A61uqUA1ORacaIdKt5xFDurx7EpyTw= =3AYx -END PGP SIGNATURE- <>___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Another weird unicode error from Zope 2
Am 13.10.2010, 12:06 Uhr, schrieb Chris Withers : > So why on earth is iso8859_15 being picked instead of utf-8? I would guess this is the default-publisher-encoding of your system. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Another weird unicode error from Zope 2
On 12/10/2010 16:00, Charlie Clark wrote: > Traceback (most recent call last): > File "", line 1, in > UnicodeEncodeError: 'latin-1' codec can't encode character u'\u203a' in > position 0: ordinal not in range(256) > > ISO-8859-15 is, of course, Latin-1 + the € Yes, but I don't see why that is being used... Some bits from the error_log entry for this request: HTTP_USER_AGENT 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; MDDC; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MS-RTC LM 8; .NET4.0C)' HTTP_ACCEPT '*/*' HTTP_ACCEPT_LANGUAGE'en-us' So why on earth is iso8859_15 being picked instead of utf-8? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Another weird unicode error from Zope 2
Am 12.10.2010, 16:51 Uhr, schrieb Chris Withers : > UnicodeEncodeError: 'charmap' codec can't encode character u'\u203a' in > position 2439: character maps to Hi Chris, according to http://wiki.python.org/moin/UnicodeEncodeError this is what you get when you try and encode a unicode codepoint to a charset which cannot represent it. The error message appears to depend upon the charset: >>> u'\u203a'.encode("iso-8859-15") Traceback (most recent call last): File "", line 1, in File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/encodings/iso8859_15.py", line 12, in encode return codecs.charmap_encode(input,errors,encoding_table) UnicodeEncodeError: 'charmap' codec can't encode character u'\u203a' in position 0: character maps to >>> u'\u203a'.encode("latin-1") Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'latin-1' codec can't encode character u'\u203a' in position 0: ordinal not in range(256) ISO-8859-15 is, of course, Latin-1 + the € Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Another weird unicode error from Zope 2
Anyone seen this or know what it means? Traceback (innermost last): Module ZPublisher.Publish, line 130, in publish Module ZServer.HTTPResponse, line 266, in setBody Module ZPublisher.HTTPResponse, line 330, in setBody Module ZPublisher.HTTPResponse, line 485, in _encode_unicode Module encodings.iso8859_15, line 12, in encode UnicodeEncodeError: 'charmap' codec can't encode character u'\u203a' in position 2439: character maps to cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )