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.
The translation is Xianglan Shirley JiのAmerican Online Inc (view this page in Japanese (Shift-JIS))
Cc to putterman Scott, I need help from mail group. Who is working on S/MIME?
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.
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]
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: 17 years ago
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
adding adt1.0.0+ for checkin to the 1.0 branch. Please get drivers approval before checking into the branch.
I received approval from endico by email and IRC. Checked in to branch.
Verified as fixed with 06/03 branch build by replacing pipnss.properties file with the translated one in Ja build
You need to log in before you can comment on or make changes to this bug.