Closed Bug 47865 Opened 24 years ago Closed 24 years ago

int chars in error msg brakes error message

Categories

(MailNews Core :: Networking: IMAP, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: bugzilla, Assigned: nhottanscp)

Details

(Whiteboard: [nsbeta3-])

When I try to select a IMAP folder which I dont have permission to view the IMAP logs shows the following: 1224[b015690]: tarkinA:SendData: 18 select "Contactel" 1224[b015690]: tarkinA:CreateNewLineFromSocket: 18 NO Adgang nægtet But in the alert that the user is shown it only says: "NO Adgang n" The int char "æ" seems to brake the rest of the error message, so that it never shows to the user.
this could be a good candidate for me to load balance to someone else....
Keywords: correctness, nsbeta3
Target Milestone: --- → M18
Naoki, can you and Kat take a look at this? Kat has a japanese localized server you can test against. I wonder how pervasive the problem is? I know most dialogs with japanese strings show up okay.
Assignee: mscott → nhotta
Scott, what encoding the IMAP server is supposed to send back the errors msgs in? Was that UTF-* if it contains 8-bit data?
The string is in UTF-8 and we then blow it up to a PRUnichar * before inserting it into the alert dialog.
Status: NEW → ASSIGNED
Then, this could be another manifestation of Bug 35004. Naoki, can we talk about this? I can probably setup the server to Latin 1 error msgs.
what does "blow it up to a PRUnichar * " mean ?
utf-8 is single byte. unichar is multibyte characters. "blowing up" to unichar refers to the act of expanding a single byte char string into a multibyte char string. It's just a figure of speach.
Marking as nsbeta3- per I18N Bug Triage.
Whiteboard: [nsbeta3-]
gemal, I think this seems to be an invalid bug. Correct me if I am wrong but I think your IMAP server is sending error messages using 8-bit characters encoded in ISO-8859-1. I checked our internal server and when an IMAP server sends UTF-8 error msgs, we DO NOT truncate the same characters that you used and Mozilla shows such an error msg correctly. I'm going to CC jgmyers and taka for confirmation of the following but it seems to me that the current IMAP RFC 2060 does not allow sending 8-bit error messages in ISO-8859-1. In fact I don't believe you can send any 8-bit error msgs unless you use something like IMAP Language Extension protocol which Mozilla supoprts now. And if you are using the Language extension protocol, then the IMAP server needs to send such msgs in UTF-8, not in any one of native encodings.
Just for the record. My IMAP server is an MS Exchange: * OK Microsoft Exchange IMAP4rev1-server version 5.5.2232.11 (tarkin.ost.tele.dk) er klar * CAPABILITY IMAP4 IMAP4rev1 IDLE LITERAL+ LOGIN-REFERRALS MAILBOX-REFERRALS NAMESPACE AUTH=NTLM
The truncation is probably a result of bug 35004. The error string is, however, restricted to US-ASCII per protocol. 8-bit data are not allowed per the RFC, so this is a server protocol violation.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
I've reported the IMAP server protocol violation to Microsoft, not that they will fix it, but anyways...
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.