If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

MIME-encoded Sender names (multi-byte) get quoted as dots rather than as characters

VERIFIED FIXED in M12

Status

MailNews Core
Composition
P3
major
VERIFIED FIXED
18 years ago
9 years ago

People

(Reporter: Katsuhiko Momoi, Assigned: Jean-Francois Ducarroz)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: I have a fix)

(Reporter)

Description

18 years ago
** Observed with 11/9/99 Win32 build (1999110911) **

This bug is a companion bug to Bug 8405. There I reported a failure to display MIME-encoded Multi-byte
Sender names correctly in the thread pane.

This is a bug which addresses a similar problem but the problem occurs in the quoted string in Reply
msg body as in:

(SENDER) wrote:
...
,..

where SENDER should be a multi-byte name (e.g. JPN). Instead we only see dots -- one for each multi-byte
character.
(Reporter)

Updated

18 years ago
QA Contact: lchiang → momoi

Comment 1

18 years ago
We have been seeing this (dots) as a result of using ToNewCString to nsString
which contains non Latin1 data (e.g. Japanese). This could be one of them.
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
Target Milestone: M12
(Assignee)

Comment 2

18 years ago
Cool, I have a JPN mailbox which with I can reproduce the problem.
(Assignee)

Comment 3

18 years ago
I have a fix. Will check it in when the tree open for M12:

Index: nsMsgCompose.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgCompose.cpp,v
retrieving revision 1.103
diff -r1.103 nsMsgCompose.cpp
742c748,765
<         if (NS_SUCCEEDED(parser->ExtractHeaderAddressName(nsnull, nsAutoCString(author), &authorName)))
---
>       {
> 		nsString aCharset(msgCompHeaderInternalCharset());
>         char * utf8Author = nsnull;
> 		ConvertFromUnicode(aCharset, author, &utf8Author);
> 		if (utf8Author)
> 		{
> 			rv = parser->ExtractHeaderAddressName(nsAutoCString(aCharset), utf8Author, &authorName);
> 			if (NS_SUCCEEDED(rv))
> 				ConvertToUnicode(aCharset, authorName, author);
> 		}
>
> 		if (!utf8Author || NS_FAILED(rv))
> 		{
> 			rv = parser->ExtractHeaderAddressName(nsnull, nsAutoCString(author), &authorName);
>         	if (NS_SUCCEEDED(rv))
>         		author = authorName;
> 		}
>         if (NS_SUCCEEDED(rv))
745c768
<           mMsgBody += authorName;
---
>           mMsgBody += author;
749a773,774
>         PR_FREEIF(utf8Author);
>       }
Whiteboard: I have a fix

Comment 4

18 years ago
I have a comment, ConvertFromUnicode and ConvertToUnicode return result code
(nsresult), that needs to be checked.
(Assignee)

Updated

18 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Assignee)

Comment 5

18 years ago
Fixed and checked in (and I check return value from ConvertFrom/ToUnicode,
thanks nhotta)

Comment 6

18 years ago
Same problem on linux
(Reporter)

Updated

18 years ago
Status: RESOLVED → VERIFIED
(Reporter)

Comment 7

18 years ago
** Checked with 12/14/99 Win32 build **

This has been fixed for a while.
Now we quote the sender's multi-byte names as real names
rather than as dots. I've seen this fixed on Windows
and Linux builds of recent days.
If anyone knows otherwise, let us know.
Marking the fix verified.
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.