Closed Bug 450754 Opened 16 years ago Closed 16 years ago

Non-ascii(passed in modified UTF-7) or Localized IMAP folder names don't show the pretty name until logged in

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b1

People

(Reporter: axet, Assigned: Bienvenu)

References

Details

(Keywords: regression)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1
Build Identifier: 3.0b1pre

For first 5 seconds until thunderbird make a connection to my mailbox i got folder names broken. They are in cyrrilic symbols.

Reproducible: Always
Attached image INBOX
Version: unspecified → Trunk
Summary: Floder names are broken → Folder names are broken
Night build still do not have fix
Confirmed with todays linux trunk build. 
It's easy to see if you create a folder named "åäö" and have the imap account set not to check mail at startup. The folder names are ugly until you click a folder in the account.

Regression range: 2008-03-03 03:00 -> 2008-03-04 03:00 linux builds.
<http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=ThunderbirdTinderbox&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=20080303+03%3A00%3A00&maxdate=20080304+03%3A00%3A00&cvsroot=%2Fcvsroot>

Looks like very probably fallout from bug 413721, though I don't see where it goes wrong.
Blocks: 413721
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Summary: Folder names are broken → non-ascii imap folder names don't show the pretty name until logged in
(In reply to comment #3)
> Regression range: 2008-03-03 03:00 -> 2008-03-04 03:00 linux builds.

Bug 432060 is for similar problem on MS Win, and we couldn't see problem after Tb Trunk 2008052203 Win32 build. See Bug 432060 Comment #5 and See Bug 432060 Comment #6, please.
Linux build unique issue?

(In reply to comment #3)
> Confirmed with todays linux trunk build. 
> It's easy to see if you create a folder named "åäö" and have the imap account
> set not to check mail at startup. The folder names are ugly until you click a
> folder in the account.

How/where the folder of "åäö" is created? By the Thunderbird? Or by other Thunderbird, or via Web interface, or via server side application?
Is it true even after "click a folder in the account" and shutdown/restart of Tb?
Seems to me Ivan in bug 432060 sees the same issue - he says he sees it for a split second, that's the "until logged in" part if you have thunderbird set to check for new messages on startup.

The folder names all turn normal as soon as I'm connected to the server - by clicking any folder.

The "åäö" folder was created in thunderbird, though I don't think it matters.
(In reply to comment #5)
> Seems to me Ivan in bug 432060 sees the same issue

You are right.
I checked my profile and I found that "check for new messages on startup" was enabled. I probably enabled it while other testing when Bug 432060 Comment #5.
I don't know why Ivan(bug opener of Bug 432026) closed that bug as WORKSFORME.
I can see problem now again with latest Tb Trunk.

Closing Bug 432060 as DUP of this bug, because regression range is found by this bug.
FYI.
The "broken folder name" is "modified UTF-7" version of non-ascii folder name which is defined in RFC 3501.
> http://www.faqs.org/rfcs/rfc3501.html
You can see the "modified UTF-7" string in Properties/Location: of the IMAP folder.
Not specific to Linux, obviously.
OS: Linux → All
Hardware: PC → All
Given bug 467528 and the text in this bug, I doubt it matters if its ascii or non ascii, changing summary to Localized instead as I think that's the real issue here.
Flags: blocking-thunderbird3?
Flags: blocking-thunderbird3.0b1?
Summary: non-ascii imap folder names don't show the pretty name until logged in → Localized IMAP folder names don't show the pretty name until logged in
Did somebody find a regression window for this issue? If I remember correctly Thunderbird 2 didn't exhibit this problem...
I'll look into this - maybe there's an easy solution we can get in for beta 1.
Assignee: nobody → bienvenu
Target Milestone: --- → Thunderbird 3.0b1
the issue is that we're not going through nsMsgDBFolder::SetPrettyName until we've got the folder name back from the server:

>	msgbsutl.dll!nsMsgDBFolder::SetName(const nsAString_internal & name={...})  Line 2847	C++
 	msgbsutl.dll!nsMsgDBFolder::SetPrettyName(const nsAString_internal & name={...})  Line 2802 + 0x21 bytes	C++
 	msgimap.dll!nsImapIncomingServer::PossibleImapMailbox(const nsACString_internal & folderPath={...}, unsigned short hierarchyDelimiter=0x002f, int boxFlags=0x00000040, int * aNewFolder=0x0f81f950)  Line 1263	C++


For IMAP, on startup, perhaps we can use the online name, convert it from imap mod utf7 to unicode, and call SetPrettyName. I'll give that a try later...this would fix both the localized special folders name problem, and the imap mod utf7 type names (e.g., a&b, where & is escaped by imap mod utf7)
Attached patch proposed fixSplinter Review
this was indeed caused by the patch in https://bugzilla.mozilla.org/show_bug.cgi?id=413721; a little too much code was removed. I've verified that this does fix the utf7 folder name issue (e.g., a&b), and I'm reasonably confident it will also fix the localized folder name issue, because we will now execute this code at the end of the same method.

      // use the unicode name as the "pretty" name. Set it so it won't be
      // automatically computed from the URI, which is in utf7 form.
      if (!currentFolderNameStr.IsEmpty())
        child->SetPrettyName(currentFolderNameStr);
Attachment #351228 - Flags: superreview?(bugzilla)
Attachment #351228 - Flags: review?(bugzilla)
marking as a blocker since understand the regression and have what looks like a safe fix.
Flags: blocking-thunderbird3? → blocking-thunderbird3+
Blocks: 467813
(In reply to comment #12)
> Given bug 467528 and the text in this bug, I doubt it matters if its ascii or
> non ascii, changing summary to Localized instead as I think that's the real
> issue here.

Mark, original problem(and DUP'ed Bug 432060, Bug 467063) is surely on non-ascii IMAP folder name at IMAP server(passed to Tb in modified UTF-7) which has no localized name, not on localized name for ascii or non-ascii folder name.
See Comment #8 and Comment #16, please.
Adding "non-ascii" in bug summary again, to avoid misleading, for ease of search.
Summary: Localized IMAP folder names don't show the pretty name until logged in → Non-ascii(passed in modified UTF-7) or Localized IMAP folder names don't show the pretty name until logged in
Attachment #351228 - Flags: superreview?(bugzilla)
Attachment #351228 - Flags: superreview+
Attachment #351228 - Flags: review?(bugzilla)
Attachment #351228 - Flags: review+
Comment on attachment 351228 [details] [diff] [review]
proposed fix

I've checked this on a de build and it fixes both issues.
I've checked this in: http://hg.mozilla.org/comm-central/rev/609c0c7975ba

It will be in today's Thunderbird nightly builds.
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: blocking-thunderbird3.0b1?
Resolution: --- → FIXED
(In reply to comment #20)
> (From update of attachment 351228 [details] [diff] [review])
> I've checked this on a de build and it fixes both issues.

It also fixes incorrect sorting issue (after change to pretty name folder list was not alphabetical ordered), thanks!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: