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



17 years ago
11 years ago


(Reporter: ji, Assigned: kaie)


({intl, l12y})

Windows 2000
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [adt1 rtm])


(3 attachments)



17 years ago
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

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.

Comment 1

17 years ago
The translation is 
Xianglan Shirley JiのAmerican Online Inc (view this page in Japanese

Comment 2

17 years ago
Nominating for nsbeta1.
Keywords: l12y, nsbeta1

Comment 3

17 years ago
Cc to putterman
Scott, I need help from mail group. Who is working on S/MIME?

Comment 4

17 years ago
Blocks: 141008
Keywords: nsbeta1intl, nsbeta1+

Comment 5

17 years ago
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

Comment 6

17 years ago
I looked at the code for the accout dialog but it just gets the string from

118 function smimeSelectCert(smime_cert)


Reassign to putterman, please find a right owner for this.
Assignee: nhotta → putterman

Comment 7

17 years ago
It looks like mscott show the most on the cvsblame. 

Comment 8

17 years ago
reassgning to kaie.
Assignee: putterman → kaie

Comment 9

17 years ago
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.

Comment 10

17 years ago
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?

Comment 11

17 years ago
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
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.

Comment 12

17 years ago
Ying, could you put JA localized strings for nick_template and

I think replace those strings in pipness.properties and rebuild make the problem
reproducible on debug build.

Comment 13

17 years ago
Here it is!

Comment 14

17 years ago
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

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.
Whiteboard: [adt1 rtm]

Comment 15

17 years ago
Posted patch Suggested FixSplinter Review
Javi, can you please review?

Comment 16

17 years ago
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

Comment 17

17 years ago
Comment on attachment 83979 [details] [diff] [review]
Suggested Fix

i'll go ahead and sr this now since the change is so straight forward.

pending Javi's module owner review of course.
Attachment #83979 - Flags: superreview+

Comment 18

17 years ago
Comment on attachment 83979 [details] [diff] [review]
Suggested Fix

Attachment #83979 - Flags: review+

Comment 19

17 years ago
Checked in to trunk.
Closed: 17 years ago
Keywords: adt1.0.0
Resolution: --- → FIXED

Comment 20

17 years ago
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.


17 years ago
Keywords: approval

Comment 21

17 years ago
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+

Comment 22

17 years ago
I received approval from endico by email and IRC.

Checked in to branch.
Keywords: adt1.0.0+fixed1.0.0


17 years ago
Blocks: 146292
No longer blocks: 141008

Comment 23

17 years ago
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.