Closed Bug 1493418 Opened 3 years ago Closed 3 years ago
[regression] Garbled name for Simplified Chinese in Font Settings
STR: 1. Open about:preferences, click the Font & Color - Advanced button. 2. Select the "Simplified Chinese" for "Fonts for". Actual results: Fonts names (in Chinese) are garbled. Expected results: Regular Chinese name. Regression range: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=643ffcb9063dfb9395c76d81665ed4cd03c0dff3&tochange=588fe70e5905480ebc60225b4b093ff276df72d2
Ugh! Thanks for reporting, will look into it. Clearly we're missing a utf8/16 conversion somewhere.
Assignee: nobody → jfkthame
Priority: -- → P3
Which platform(s) are you seeing the bug on?
(In reply to Jonathan Kew (:jfkthame) from comment #2) > Which platform(s) are you seeing the bug on? Windows 10 (1803) x64.
The 8-bit font names we're now using in thebes are utf-8; but unfortunately nsThebesFontEnumerator was applying ToNewUnicode to get a 16-bit string, and the 8-bit version of that function treats the input as Latin-1. So we need to use UTF8ToNewUnicode instead here.
Attachment #9011245 - Flags: review?(lsalzman)
Attachment #9011245 - Flags: review?(lsalzman) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/ed4b9b12e32a nsThebesFontEnumerator needs to convert font names from UTF-8 (not Latin-1) to UTF-16. r=lsalzman
Fixed in 64.0a1 20180924220042.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.