Open Bug 1002750 Opened 10 years ago Updated 2 years ago

Characters "non-English" not show fine in menu "Help-About"

Categories

(Firefox :: General, defect)

28 Branch
defect

Tracking

()

People

(Reporter: joao, Unassigned)

Details

Attachments

(3 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 5.2; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20140314220517

Steps to reproduce:

1) URL-> about:config
2) Set preferences ("distribution.id";"ã & ó"), ("distribution.version";"ã & ó") and ("distribution.about";"ã & ó") with characters "non-English" 
3) Access the Help menu, option "About"


Actual results:

Preferences "distribution.id" and "distribution.version" are not displayed correctly. :(
Preference "distribution.about" are displayed correctly. :)


Expected results:

The preferences "distribution.id" and "distribution.version" should display non-English characters correctly. Preference "distribution.about" are displayed correctly. :)
Like bug 895473, them also need 'Services.prefs.getComplexValue'.
ref: http://hg.mozilla.org/mozilla-central/file/cfde3603b020/browser/base/content/aboutDialog.js#l10
Blocks: 900925
Status: UNCONFIRMED → NEW
Component: Untriaged → General
Ever confirmed: true
OS: Windows Server 2003 → All
Hardware: x86 → All
Bug 900925 is about an error message being displayed in the console and has nothing to do with this bug so unblocking.
No longer blocks: 900925
Attached patch patch v1 (obsolete) — Splinter Review
Attachment #8414157 - Flags: review?(gavin.sharp)
Flags: firefox-backlog+
Comment on attachment 8414157 [details] [diff] [review]
patch v1

Thanks for patching. r- for two reasons:

- We should not retrieve distribution.id twice.

- I also think it is unnecessary to move the retrieval of distribution.version into the inner try/catch block, unless there is evidence that this is problematic in practice.
Attachment #8414157 - Flags: review?(gavin.sharp) → review-
Attached patch patch v2Splinter Review
Thanks you to point out the issue! in this way?
Attachment #8414157 - Attachment is obsolete: true
Attachment #8415911 - Flags: review?(gavin.sharp)
Comment on attachment 8415911 [details] [diff] [review]
patch v2

Thanks for the updated patch, but now it's not clear to me why you're moving the distroVersion/distroIdField code outside of the "if (distroId)" block. This patch should just be a simple switch from getCharPref to getComplexValue with no other moving things around, as I understand it.
Attachment #8415911 - Flags: review?(gavin.sharp) → review-

I came here to report that the problem continues to release 75.0.

workaround

  1. create "[app path]/defaults/pref/autoconfig.js" file
    // dummy
    pref("general.config.obscure_value", 0);
    pref("general.config.filename", "mozilla.cfg");

  2. create "[app path]/mozilla.cfg"

2.1) encode ASCII file
// dummy
lockPref( "distribution.about", unescape( encodeURIComponent( "Por João Mac-Cormick" ) ) );
lockPref( "distribution.id", "pacote da casa do João Mac-Cormick" );
lockPref( "distribution.version", "versão 2020.4" );

OR

2.2) encode UTF-8 file
// dummy
lockPref( "distribution.about", "Por João Mac-Cormick" );
lockPref( "distribution.id", decodeURIComponent( escape( "pacote da casa do João Mac-Cormick" ) ) );
lockPref( "distribution.version", decodeURIComponent( escape( "versão 2020.4" ) ) );

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: