[CalendarServer-users] UTF-8 Encoding Problem
Frank Strauß
strauss at ibr.cs.tu-bs.de
Fri Dec 8 02:47:26 PST 2006
Cyrus Daboo wrote:
> Hi Frank,
>
> --On December 8, 2006 1:51:33 AM +0100 Frank Strauß
> <strauss at ibr.cs.tu-bs.de> wrote:
>> When a request submitted to the server contains non-ascii characters,
>> the server raises an error like this:
>>
>> 2006/12/08 01:01 +0200 [-] "Error while handling (calendar) PUT: 'ascii'
>> codec can't encode character u'\\xdf' in position 321: ordinal not in
>> range(128)"
>
> This is a bug in Mulberry - its not sending utf-8 as it should, but
> instead iso-8859-1 or something. I guess I will kick the Mulberry person
> and get them to fix it :-)
Hi Cyrus,
thanks for your quick response.
I'm not completely sure, but I don't think it's a bug in Mulberry. I
recoded Mulberry's request myself and could not find any problems. Then
I tried Mozilla Sunbird and had the same problem: pure ASCII requests
work fine, umlauts in the SUMMARY (or elsewhere?) raise the same error
on the server. The encoding of the same three umlauts results in the
same six UTF-8 octets.
Here is the "Ethereal Follow TCP Stream" output of both requests. (Sorry
for any inconvenience due to this message's "flowed" format.) Note the
different Content-Type values and the different line breaks (0x0a in
Mulberry, 0x0d 0x0a in Sunbird), though the raised error is the same.
I do not yet have an iCal3 to play with. Can you suggest any other
clients I could try and compare?
-frank
------------------------------------------------------------------------
PUT
/calendars/user/admin/calendar/C95A06E7A9AE2A715E1EE9C6443F0C22-0.ics
HTTP/1.1
Host: arlet.ibr.cs.tu-bs.de:8008
Authorization: Basic YWRtaW46YWRtaW4=
Content-Length: 268
Content-Type: text/calendar; charset=utf-8
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//mulberrymail.com//Mulberry v4.0//EN
VERSION:2.0
BEGIN:VEVENT
DTSTAMP:20061207T230734Z
DTSTART:20061208T150000
DURATION:PT1H
SUMMARY:test ...... [these octets are: c3 a4 c3 b6 c3 bc]
UID:C0D2A0D9FFF71C26E0CB3B1B at 3F7E75525D657AFE2998055D
END:VEVENT
END:VCALENDAR
------------------------------------------------------------------------
HTTP/1.1 400 Bad Request
Date: Thu, 07 Dec 2006 23:07:44 GMT
DAV: 1, access-control, calendar-access, calendar-schedule
Content-Type: text/html
Content-Length: 176
Server: Twisted/2.4.0+r18545 TwistedWeb/[twisted.web2, version 0.2.0
(SVN r18545)] TwistedCalDAV/?
<html><head><title>Bad Request</title></head><body><h1>Bad
Request</h1><p>'ascii' codec can't encode characters in position
245-247: ordinal not in range(128)</p></body></html>
------------------------------------------------------------------------
------------------------------------------------------------------------
PUT
/calendars/user/admin/calendar/40D16ADA5D05D7BB293289E96C505621-0.ics
HTTP/1.1
Host: arlet.ibr.cs.tu-bs.de:8008
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;
rv:1.9a1) Gecko/20061006 Sunbird/0.3
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Content-Length: 930
Content-Type: text/calendar
Authorization: Basic YWRtaW46YWRtaW4=
BEGIN:VCALENDAR
PRODID:-//Mozilla Calendar//NONSGML Sunbird//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20061208T100915Z
LAST-MODIFIED:20061208T101553Z
DTSTAMP:20061208T101553Z
UID:FD7ACE2557AB961D20CBAA05 at CA1CBED546AAE36FF3BC722E
SUMMARY:test ...... [these octets are: c3 a4 c3 b6 c3 bc]
PRIORITY:0
CLASS:PUBLIC
DTSTART;TZID=/mozilla.org/20050126_1/Africa/Ceuta:20061208T100000
DTEND;TZID=/mozilla.org/20050126_1/Africa/Ceuta:20061208T110000
X-MOZ-LOCATIONPATH:40D16ADA5D05D7BB293289E96C505621-0.ics
DURATION:PT1H
END:VEVENT
BEGIN:VTIMEZONE
TZID:/mozilla.org/20050126_1/Africa/Ceuta
X-LIC-LOCATION:Africa/Ceuta
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
END:VCALENDAR
------------------------------------------------------------------------
HTTP/1.1 400 Bad Request
Date: Fri, 08 Dec 2006 10:15:53 GMT
DAV: 1, access-control, calendar-access, calendar-schedule
Content-Type: text/html
Content-Length: 176
Server: Twisted/2.4.0+r18545 TwistedWeb/[twisted.web2, version 0.2.0
(SVN r18545)] TwistedCalDAV/?
<html><head><title>Bad Request</title></head><body><h1>Bad
Request</h1><p>'ascii' codec can't encode characters in position
836-838: ordinal not in range(128)</p></body></html>
------------------------------------------------------------------------
More information about the calendarserver-users
mailing list