[MERGE #6114 @atulkatti] Update the ICU download URLs to GitHub locations. Also, update to ICU version 63.2.

Merge pull request #6114 from atulkatti:UpdateICUDownloadLinks.2
diff --git a/build.sh b/build.sh
index 746666a..d670c38 100755
--- a/build.sh
+++ b/build.sh
@@ -408,7 +408,7 @@
 if [[ $USE_LOCAL_ICU == 1 ]]; then
     LOCAL_ICU_DIR="$CHAKRACORE_DIR/deps/Chakra.ICU/icu"
     if [[ ! -d $LOCAL_ICU_DIR ]]; then
-        "$PYTHON2_BINARY" "$CHAKRACORE_DIR/tools/icu/configure.py" 57.1 $ALWAYS_YES
+        "$PYTHON2_BINARY" "$CHAKRACORE_DIR/tools/icu/configure.py" 63.2 $ALWAYS_YES
     fi
 
     # if there is still no directory, then the user declined the license agreement
diff --git a/test/Intl/GetCanonicalLocales.js b/test/Intl/GetCanonicalLocales.js
index 082eea0..2fe70ec 100644
--- a/test/Intl/GetCanonicalLocales.js
+++ b/test/Intl/GetCanonicalLocales.js
@@ -139,7 +139,9 @@
 

             // duplicateTags.forEach(testRangeError);

             duplicateSingletons.forEach(testRangeError);

-            duplicateUnicodeExtensionKeys.forEach(testRangeError);

+            if (WScript.Platform.INTL_LIBRARY === "winglob") {

+                duplicateUnicodeExtensionKeys.forEach(testRangeError);

+            }

         }

     },

     {

diff --git a/test/Intl/NumberFormat.js b/test/Intl/NumberFormat.js
index 866852e..7c4ca49 100644
--- a/test/Intl/NumberFormat.js
+++ b/test/Intl/NumberFormat.js
@@ -143,7 +143,7 @@
             assert.areEqual("$1.50", formatCurrency({ currencyDisplay: "symbol" }, 1.504), "Currency display: symbol");
             assert.areEqual("$1.51", formatCurrency({ currencyDisplay: "symbol" }, 1.505), "Currency display: symbol");
             // ICU has a proper "name" currency display, while WinGlob falls back to "code"
-            if (WScript.Platform.ICU_VERSION === 62) {
+            if (WScript.Platform.ICU_VERSION >= 62) {
                 // In ICU 62, there is a mismatch between "1.00 US dollar" and "1.00 US dollars"
                 suppressFormatEqualityCheck = true;
             }
diff --git a/tools/icu/configure.py b/tools/icu/configure.py
index bd2ff12..4423902 100644
--- a/tools/icu/configure.py
+++ b/tools/icu/configure.py
@@ -144,10 +144,16 @@
     extension = "zip" if os.name == "nt" else "tgz"
 
     archive_file = "icu4c-{0}-src.{1}".format(version.replace(".", "_"), extension)
-    md5_file = "icu4c-src-{0}.md5".format(version.replace(".", "_"))
+    # Use this in future, currently the SHA hash file name for version 63.2 seems to not include version name.
+    #hash_file = "icu4c-{0}-src.{1}.asc".format(version.replace(".", "_"), extension)
+    hash_file = "icu4c-SHASUM512.txt.asc"
 
-    archive_url = "http://download.icu-project.org/files/icu4c/{0}/{1}".format(version, archive_file)
-    md5_url = "https://ssl.icu-project.org/files/icu4c/{0}/{1}".format(version, md5_file)
+    archive_url = "https://github.com/unicode-org/icu/releases/download/release-{0}/{1}".format(version.replace(".", "-"), archive_file)
+    hash_url = "https://github.com/unicode-org/icu/releases/download/release-{0}/{1}".format(version.replace(".", "-"), hash_file)
+    #print(archive_file)
+    #print(hash_file)
+    #print(archive_url)
+    #print(hash_url)
 
     license_confirmation = """
 {1}
@@ -173,24 +179,24 @@
     # check the hash of the download zipfile/tarball
     checksum = ""
     with open(archive_path, "rb") as download:
-        md5 = hashlib.md5()
-        md5.update(download.read())
-        checksum = md5.hexdigest()
+        hashAlgorithm = hashlib.sha512()
+        hashAlgorithm.update(download.read())
+        checksum = hashAlgorithm.hexdigest()
 
-    md5_path = os.path.join(icuroot, md5_file)
-    md5_request = urllib2.urlopen(md5_url)
-    md5s = md5_request.read().decode("ascii").split("\n")
-    relevant_md5 = filter(lambda line: line[len(line) - len(archive_file):] == archive_file, md5s)
-    if len(relevant_md5) != 1:
-        raise Exception("Could not find md5 hash for %s in %s" % archive_file, md5_url)
+    hash_path = os.path.join(icuroot, hash_file)
+    hash_request = urllib2.urlopen(hash_url)
+    allHashes = hash_request.read().decode("ascii").split("\n")
+    relevant_hash = filter(lambda line: line[len(line) - len(archive_file):] == archive_file, allHashes)
+    if len(relevant_hash) != 1:
+        raise Exception("Could not find hash for {0} in {1}".format(archive_file, hash_url))
 
-    correct_hash = relevant_md5[0]
+    correct_hash = relevant_hash[0]
     correct_hash = correct_hash.split(" ")[0]
     if (correct_hash == checksum):
-        print("MD5 checksums match, continuing")
+        print("Hash checksums match, continuing")
         return archive_path
     else:
-        raise Exception("MD5 checksums do not match. Expected %s, got %s" % correct_hash, checksum)
+        raise Exception("Hash checksums do not match. Expected {0}, got {1}".format(correct_hash, checksum))
 
 def extract_icu(icuroot, archive_path):
     tempdir = os.path.normpath(os.path.join(icuroot, "temp"))