Closed Bug 1384944 Opened 7 years ago Closed 7 years ago

Mojibake in Media section of about:support

Categories

(Core :: Audio/Video: Playback, defect, P2)

56 Branch
x86_64
Windows 10
defect

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox-esr52 --- unaffected
firefox54 --- unaffected
firefox55 --- unaffected
firefox56 --- fixed
firefox57 --- fixed

People

(Reporter: alice0775, Assigned: chunmin)

References

Details

Attachments

(2 files)

Attached image screenshot
Mojibake in Media section of about:support

Steps To Reproduce:
1. Using Nightly 56.0a1 en-US build on Windows10 1703 Japanese Edition
2. Open about:support

Actual Results:
Mojibake in Device neme. See attached screenshot
Chun-Min, want to have a look ?
Component: Untriaged → Audio/Video
Flags: needinfo?(cchang)
Product: Firefox → Core
Nightly 56.0a1 ja build is also affected. So, It seems to happen regardless of the localization build.
I guess the reason is using NS_ConvertASCIItoUTF16[0]. The friendly_name, group_id of cubeb_device_info is converted to UTF8 on Windows but NS_ConvertASCIItoUTF16 will mangle any non-ASCII string into a meaningless UTF-16 string. 
Replacing NS_ConvertASCIItoUTF16 with NS_ConvertUTF8toUTF16 should solve it, but we need to make sure the friendly_name, group_id, vendoer_name are also UTF8 in other backends.

[0] https://searchfox.org/mozilla-central/rev/09c065976fd4f18d4ad764d7cb4bbc684bf56714/dom/media/CubebUtils.cpp#613-615
[1] https://searchfox.org/mozilla-central/rev/09c065976fd4f18d4ad764d7cb4bbc684bf56714/media/libcubeb/src/cubeb_wasapi.cpp#2202,2213
[2] https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Guide/Internal_strings#ASCII_to_UTF-16_converters
Assignee: nobody → cchang
Flags: needinfo?(cchang)
Rank: 25
Component: Audio/Video → Audio/Video: Playback
Priority: -- → P2
Comment on attachment 8891270 [details]
Bug 1384944 - Replace NS_ConvertASCIItoUTF16 by NS_ConvertUTF8toUTF16;

https://reviewboard.mozilla.org/r/162474/#review168790
Attachment #8891270 - Flags: review?(padenot) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/df430a961c90
Replace NS_ConvertASCIItoUTF16 by NS_ConvertUTF8toUTF16; r=padenot
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/df430a961c90
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
See Also: → 1391162
Comment on attachment 8891270 [details]
Bug 1384944 - Replace NS_ConvertASCIItoUTF16 by NS_ConvertUTF8toUTF16;

Approval Request Comment
[Feature/Bug causing the regression]: Bug 1197045
[User impact if declined]: when running Firefox on a platform with a locale that uses characters that are not in the ASCII set, audio devices names are showing up garbled.
[Is this code covered by automated tests?]: No.
[Has the fix been verified in Nightly?]: Yes, in this bug and in bug 1391162 (that prompted for this uplift request).
[Needs manual test from QE? If yes, steps to reproduce]: I think we're pretty confident here. If needed in [0] are steps to manually verify this patch.  
[List of other uplifts needed for the feature/fix]: None.
[Is the change risky?]: No.
[Why is the change risky/not risky?]: The fix is tiny, and the cause is well understood. Multiple people have provided independent verification, in multiple locales, on multiple OS versions.
[String changes made/needed]: None
Attachment #8891270 - Flags: approval-mozilla-beta?
Comment on attachment 8891270 [details]
Bug 1384944 - Replace NS_ConvertASCIItoUTF16 by NS_ConvertUTF8toUTF16;

Fix a Mojibake issue in about:support. Beta56+.
Attachment #8891270 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.