mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 766604 - Convert UTF-8 App names to UTF16 for Java. r=mbrubeck
This commit is contained in:
parent
06d91d67a6
commit
54fceaffe6
@ -5890,6 +5890,12 @@ var WebappsUI = {
|
||||
return;
|
||||
let manifest = new DOMApplicationManifest(aManifest, data.origin);
|
||||
|
||||
// The manifest is stored as UTF-8, sendMessageToJava expects UTF-16. Convert before sending
|
||||
let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Ci.nsIScriptableUnicodeConverter);
|
||||
converter.charset = "UTF-8";
|
||||
let name = manifest.name ? converter.ConvertToUnicode(manifest.name) :
|
||||
converter.ConvertToUnicode(manifest.fullLaunchPath());
|
||||
|
||||
// Add a homescreen shortcut -- we can't use createShortcut, since we need to pass
|
||||
// a unique ID for Android webapp allocation
|
||||
this.makeBase64Icon(this.getBiggestIcon(manifest.icons, Services.io.newURI(data.origin, null, null)),
|
||||
@ -5897,7 +5903,7 @@ var WebappsUI = {
|
||||
sendMessageToJava({
|
||||
gecko: {
|
||||
type: "WebApps:Install",
|
||||
name: manifest.name,
|
||||
name: name,
|
||||
launchPath: manifest.fullLaunchPath(),
|
||||
iconURL: icon,
|
||||
uniqueURI: data.origin
|
||||
|
Loading…
Reference in New Issue
Block a user