Closed Bug 144823 Opened 22 years ago Closed 22 years ago

Localized certificate name is garbled, unable to send out signed/encrypted mail on a localized build

Categories

(MailNews Core :: Internationalization, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ji, Assigned: KaiE)

References

Details

(Keywords: intl, l12y, Whiteboard: [adt1 rtm])

Attachments

(3 files)

On a localized build, the translated certificate name is garbled on the certificate list, the user can't send out signed or encrypted mail with that certificate. Steps to reproduce: 1. On a Japanese build, install a certificate. 2. Go to Mail account manager's Security pane 3. Click on Select button to select the installed certificate, you can see the certificate's name is garbled on the list. 4. Compose the mail and send it out as a signed mail, an error comes up saying the certificate is not found. A screen shot to follow.
Attached image A screenshot on a Ja build. (deleted) —
The translation is Xianglan Shirley JiのAmerican Online Inc (view this page in Japanese (Shift-JIS))
Nominating for nsbeta1.
Keywords: l12y, nsbeta1
Cc to putterman Scott, I need help from mail group. Who is working on S/MIME?
nsbeta1+
Blocks: 141008
Keywords: nsbeta1intl, nsbeta1+
the certificate name is in pipness.properties: nick_template=%1$s's %2$s ID nick_template_with_num=%1$s's %2$s ID #%3$d
I looked at the code for the accout dialog but it just gets the string from nsIUserCertPicker. 118 function smimeSelectCert(smime_cert) http://lxr.mozilla.org/seamonkey/source/mailnews/extensions/smime/resources/content/am-smime.js#118 Reassign to putterman, please find a right owner for this.
Assignee: nhotta → putterman
It looks like mscott show the most on the cvsblame.
reassgning to kaie.
Assignee: putterman → kaie
For the first time, I tried Mozilla in japanese. Question 1: When you say "a japanese build", do you just mean, a standard build of Mozilla, that has the japanese language pack installed? I.e. should I be able to see the problem, when I have a Mozilla 1.0.0 branch build, and install the RC2 language pack from http://mozilla.org/projects/l10n/mlp_status.html ? I did the above on my Linux system. I installed japanese fonts and was able to select the UI, and it seems to work. I started with an empty certificate database, installed my own corporate cert from a p12 file backup. Question 2: Did you do the same, i.e. restore from a cert p12 backup file? Or did you obtain your certificate from the corporate certificates server? When I do the above, and select the cert, I don't see a broken character. I am able to send a signed message.
Ji, in your comment 1, after "Xianglan Shirley Ji" and "American Online Inc" what kind of character is that? Is that a part of your name in your certificate? Does your name in your certificate contain a japanese character?
Kai, please see my answer below: >Question 1 I think you can install the language pack on your mozilla build, but please make sure in that language pack, the following two strings are translated in pipness.properties nick_template=%1$s's %2$s ID nick_template_with_num=%1$s's %2$s ID #%3$d >Question 2 I obtained my certificate from the corporate certificates server Between "Xianglan Shirley Ji" and "American Online Inc" that's the Japanese translation of "'s" (the English string is "Xianglan Shirley Ji's American Online Inc ID"), it's not part of my name, and it should be displayed correctly, but now it's garbled.
Ying, could you put JA localized strings for nick_template and nick_template_with_num. I think replace those strings in pipness.properties and rebuild make the problem reproducible on debug build.
Attached file JA localized pipnss.properties (deleted) —
Here it is!
Ok, I found the problem. When we install a certificate, we generate a nickname for it. That nickname is allowed to be Unicode, get's converted to UTF-8 and is stored in the crypto database. However, when we read back the nickname (or any other certificate attributes) from the crypto database, the code does an ASCII to Unicode conversion, instead of converting from UTF-8 to Unicode.
Status: NEW → ASSIGNED
Whiteboard: [adt1 rtm]
Attached patch Suggested Fix (deleted) — Splinter Review
Javi, can you please review?
FYI, I was able to reproduce the problem, using english strings, only replacing the nick_template strings with the japanese translation. I saw the failure. The patch fixes the problem for me. Luckily we don't have corrupt data in the crypto database. To fix the problem with the patch applied, it is sufficient to go to mail security preferences, and select the certificate once again. After doing so I was able to send a signed message.
Comment on attachment 83979 [details] [diff] [review] Suggested Fix i'll go ahead and sr this now since the change is so straight forward. sr=mscott pending Javi's module owner review of course.
Attachment #83979 - Flags: superreview+
Comment on attachment 83979 [details] [diff] [review] Suggested Fix r=javi
Attachment #83979 - Flags: review+
Checked in to trunk.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Keywords: adt1.0.0
Resolution: --- → FIXED
Verified as fixed with 05/17 build by replacing pipnss.properties file with the translated one in Ja build. The translated certificate is displayed correctly and I can send out signed and encrypted mail by using that certificate.
Status: RESOLVED → VERIFIED
Keywords: approval
adding adt1.0.0+ for checkin to the 1.0 branch. Please get drivers approval before checking into the branch.
Keywords: adt1.0.0adt1.0.0+
I received approval from endico by email and IRC. Checked in to branch.
Keywords: adt1.0.0+fixed1.0.0
Blocks: 146292
No longer blocks: 141008
Verified as fixed with 06/03 branch build by replacing pipnss.properties file with the translated one in Ja build
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: