From 3f165a4dc39b273523b9350d0e3fb35134ea039b Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 10 Apr 2012 20:00:54 -0400 Subject: [PATCH 1/3] Fix stringToUTF8Array --- chrome/content/zotero/xpcom/utilities.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index 7ad521767c..345ec9f1c2 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -1515,14 +1515,14 @@ Zotero.Utilities = { var val = string.charCodeAt(i); if(val >= 128) { if(val >= 2048) { - array[offset] = ((val >>> 6) | 192); - array[offset+1] = (val & 63) | 128; - offset += 2; - } else { array[offset] = (val >>> 12) | 224; array[offset+1] = ((val >>> 6) & 63) | 128; array[offset+2] = (val & 63) | 128; offset += 3; + } else { + array[offset] = ((val >>> 6) | 192); + array[offset+1] = (val & 63) | 128; + offset += 2; } } else { array[offset++] = val; From 62d08bdbbb987bba28ed62ab85e0c775529e0d3b Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 10 Apr 2012 20:01:11 -0400 Subject: [PATCH 2/3] Properly report upload errors and properly splice off HTML attachments --- chrome/content/zotero/xpcom/connector/translate_item.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/connector/translate_item.js b/chrome/content/zotero/xpcom/connector/translate_item.js index e6a3f0603a..f1a30476a8 100644 --- a/chrome/content/zotero/xpcom/connector/translate_item.js +++ b/chrome/content/zotero/xpcom/connector/translate_item.js @@ -42,8 +42,9 @@ Zotero.Translate.ItemSaver = function(libraryID, attachmentMode, forceTagType, d if(callback) { if(status === false || status === 100) { delete Zotero.Translate.ItemSaver._attachmentCallbacks[id]; + } else { + data[1] = 50+data[1]/2; } - data[1] = 50+data[1]/2; callback(data[1], data[2]); } }); @@ -113,7 +114,7 @@ Zotero.Translate.ItemSaver.prototype = { // Get rid of attachments that we won't be able to save properly and add ids for(var j=0; j Date: Sat, 14 Apr 2012 15:16:16 +0200 Subject: [PATCH 3/3] Fixed Integration Preferences dialog, which was giant with French locale. --- chrome/content/zotero/integration/integrationDocPrefs.xul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/integration/integrationDocPrefs.xul b/chrome/content/zotero/integration/integrationDocPrefs.xul index a3f9f60dae..0a04dbc3ea 100644 --- a/chrome/content/zotero/integration/integrationDocPrefs.xul +++ b/chrome/content/zotero/integration/integrationDocPrefs.xul @@ -64,7 +64,7 @@