bug 751177. Write "webapp.ini" and "shorcuts_log.ini" as UTF-16LE so that the uninstaller can read unicode characters from them. r=felipe
authorTim Abraldes <tabraldes@mozilla.com>
Wed, 23 May 2012 10:09:11 -0700
changeset 94734 97a2a24bbc1dc4c22ebe57d64504dfa69f31b291
parent 94733 16e329207fa20acf68f9a08622f0c5de7a7812c5
child 94735 58ca5bf0735261fb36af55db1113ae6c4abcb6d6
push id22751
push useremorley@mozilla.com
push dateThu, 24 May 2012 14:48:49 +0000
treeherdermozilla-central@2552b0541f87 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs751177
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 751177. Write "webapp.ini" and "shorcuts_log.ini" as UTF-16LE so that the uninstaller can read unicode characters from them. r=felipe
browser/modules/WebappsInstaller.jsm
--- a/browser/modules/WebappsInstaller.jsm
+++ b/browser/modules/WebappsInstaller.jsm
@@ -304,27 +304,27 @@ WinNativeApp.prototype = {
     let factory = Cc["@mozilla.org/xpcom/ini-processor-factory;1"]
                     .getService(Ci.nsIINIParserFactory);
 
     let writer = factory.createINIParser(webappINI).QueryInterface(Ci.nsIINIParserWriter);
     writer.setString("Webapp", "Name", this.appName);
     writer.setString("Webapp", "Profile", this.installDir.leafName);
     writer.setString("Webapp", "Executable", this.appNameAsFilename);
     writer.setString("WebappRT", "InstallDir", this.processFolder.path);
-    writer.writeFile();
+    writer.writeFile(null, Ci.nsIINIParserWriter.WRITE_UTF16);
 
     // ${UninstallDir}/shortcuts_log.ini
     let shortcutLogsINI = this.uninstallDir.clone().QueryInterface(Ci.nsILocalFile);
     shortcutLogsINI.append("shortcuts_log.ini");
 
     writer = factory.createINIParser(shortcutLogsINI).QueryInterface(Ci.nsIINIParserWriter);
     writer.setString("STARTMENU", "Shortcut0", this.appNameAsFilename + ".lnk");
     writer.setString("DESKTOP", "Shortcut0", this.appNameAsFilename + ".lnk");
     writer.setString("TASKBAR", "Migrated", "true");
-    writer.writeFile();
+    writer.writeFile(null, Ci.nsIINIParserWriter.WRITE_UTF16);
 
     writer = null;
     factory = null;
 
     // ${UninstallDir}/uninstall.log
     let uninstallContent = 
       "File: \\webapp.ini\r\n" +
       "File: \\webapp.json\r\n" +