cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject js commit: CB-2050 Fix BOM for windows based output targets
Date Wed, 09 Jan 2013 02:25:44 GMT
Updated Branches:
  refs/heads/master 1d429397e -> 40d3b0aa3


CB-2050 Fix BOM for windows based output targets


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/40d3b0aa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/40d3b0aa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/40d3b0aa

Branch: refs/heads/master
Commit: 40d3b0aa359dd5eac45e50d1f24633de1812026f
Parents: 1d42939
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Tue Jan 8 18:24:29 2013 -0800
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Tue Jan 8 18:24:29 2013 -0800

----------------------------------------------------------------------
 build/packager.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/40d3b0aa/build/packager.js
----------------------------------------------------------------------
diff --git a/build/packager.js b/build/packager.js
index f5695cb..98b22c2 100644
--- a/build/packager.js
+++ b/build/packager.js
@@ -29,8 +29,9 @@ packager.generate = function(platform, commitId, useWindowsLineEndings)
{
     var time = new Date().valueOf();
 
     var libraryRelease = packager.bundle(platform, false, commitId);
+    // if we are using windows line endings, we will also add the BOM
     if(useWindowsLineEndings) {
-        libraryRelease = libraryRelease.split(/\r?\n/).join("\r\n");
+        libraryRelease = "\ufeff" + libraryRelease.split(/\r?\n/).join("\r\n");
     }
     var libraryDebug   = packager.bundle(platform, true, commitId);
     


Mime
View raw message