Closed Bug 34373 Opened 25 years ago Closed 25 years ago

Non Latin1 signature file in plain text is displaying as squares

Categories

(MailNews Core :: Internationalization, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: marina, Assigned: nhottanscp)

References

Details

(Whiteboard: [nsbeta2+])

Attachments

(2 files)

Steps to reproduce: -open Notepad; -imput some JA text and save it as a text file; -go to account preferences and check signature file; -invoke a new mail composition window; //note: the attached file look like garbage
In M15, this feature is not working. Put depends on 32224. The problem of japanese signature attach is that missing charset conversion. We read raw data (in file system charset) but forgot to convert to unicode. Reassign to ducarroz (owner of 32224), please apply following patch. Index: src/nsMsgCompose.cpp =================================================================== RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgCompose.cpp,v retrieving revision 1.157 diff -c -r1.157 nsMsgCompose.cpp *** nsMsgCompose.cpp 2000/03/30 22:37:59 1.157 --- nsMsgCompose.cpp 2000/04/04 18:12:50 *************** *** 1852,1858 **** readSize = tempFile.read(readBuf, readSize); tempFile.close(); ! sigData = readBuf; PR_FREEIF(readBuf); return NS_OK; } --- 1852,1859 ---- readSize = tempFile.read(readBuf, readSize); tempFile.close(); ! if (NS_FAILED(ConvertToUnicode(nsMsgI18NFileSystemCharset(), readBuf, sigData))) ! sigData = readBuf; PR_FREEIF(readBuf); return NS_OK; }
Assignee: nhotta → ducarroz
Depends on: 32224
Status: NEW → ASSIGNED
Target Milestone: --- → M16
Keywords: nsbeta2
QA contact to marina.
QA Contact: momoi → marina
any luck with this patch?
[nsbeta2+]
Whiteboard: [nsbeta2+]
The actual code is different and therefore I don't think so I should apply this patch. Let me now if this bug still occurs. Thanks
J-F, this problem still occurs with 5/10/2000 Win32 build.
Mass moving M16 to M17 - look for nsbeta2 before anything else.
Target Milestone: M16 → M17
Summary: Double-byte signature file in plain text is displaying a garbage → Double-byte signature file in plain text is displaying as squares
Reassign to rhp (per his request)
Assignee: ducarroz → rhp
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
To help me out, can someone attach a Japanese text file attachment to this bug for me to recreate. Thanks. - rhp
Attached file japanese text file
Thanks. - rhp
Ok, I think I have Naoki's fix applied and running, but I'll need you guys to test if this is working. - rhp
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I used 2000052120 win32 commercial build (on Japanese localized WinNT4) and it is fixed for plain text mail. But I see dots when I tested HTML mail. IQA, please verify this and reopen or file a separate bug for HTML mail.
tested with 2000-05-22-09 build: there is only one scenario when it is working on Win NT JA : Mail composition set to Plain text and attachment is in txt format, everything else (html compose with txt or html signature, plain text with html signature ) fail.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Naoki, I think I need your help on this one. I'm not sure of the proper handling of some of the various combinations and I don't have a Japanese system to test on. Thanks for the help. - rhp
Assignee: rhp → nhotta
Status: REOPENED → NEW
Status: NEW → ASSIGNED
The problem of HTML case is because of ToNewCString which is used in nsMsgCompose::ConvertTextToHTML. Since nsEscapeHTML(tString) only takes char*, we may need to delay the conversion (from file system to unicode) after the HTML escape. 1870 char *tString = origBuf.ToNewCString(); 1871 if (tString) 1872 { 1873 char *escaped = nsEscapeHTML(tString); This is also reproducible with US system by using symbol characters (e.g. Euro, tradmark). I will attach the data.
Html mail with html signature is actually working fine. Plain text with html signature also works except if the html signiture file contains NCRs (but this is a problem of the content sink). I have a fix for html mail with a plain text signiture case.
Summary: Double-byte signature file in plain text is displaying as squares → Non Latin1 signature file in plain text is displaying as squares
I filed a separate bug (40350) for HTML with NCR.
have a patch, r=rhp
a=bobj
checked in yesterday
Status: ASSIGNED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
so the assumption is : it'll work on JA OS and won't on En? Do i test it only on JA system?
Yes, this is OS charset dependent.
Is that true even for HTML signature files which contain a meta-tag? If a signatue file is an attachment, it seems that we should be able to deal with it like any other attachment - encode in B64, etc.
When the html signature is converted to plain text, META charset may be used, but I am not sure. IF that is not working, please file a separate bug.
verified with 2000-07-05 M17 build, html and plain text signatures are working on JA system.
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.

Attachment

General

Creator:
Created:
Updated:
Size: