From a9928c79964e383228b7c1768029d57f40867cc9 Mon Sep 17 00:00:00 2001 From: David Gardiner Date: Wed, 24 Jan 2024 17:58:16 +1030 Subject: [PATCH] Fix PDFXchange --- PDFXchangeEditor/update.ps1 | 4 ++-- PDFXchangePro/update.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PDFXchangeEditor/update.ps1 b/PDFXchangeEditor/update.ps1 index 117774a5..e4bb1d59 100644 --- a/PDFXchangeEditor/update.ps1 +++ b/PDFXchangeEditor/update.ps1 @@ -21,8 +21,8 @@ function global:au_GetLatest { try { $response = Invoke-RestMethod -Uri "https://www.tracker-software.com/trackerupdate/TrackerData8.xml" - # Unfortunately, they're including a Byte Order Mark, so we have to trim that off - $xml = [xml] $response.Substring(3) + # Trim off any Byte Order Mark + $xml = [xml] $response.Trim([char] 0xFEFF, [char] 0x200B) $xmlNameSpace = new-object System.Xml.XmlNamespaceManager($xml.NameTable) $xmlNameSpace.AddNamespace("t", "http://schemas.tracker-software.com/trackerupdate/tb/v1") diff --git a/PDFXchangePro/update.ps1 b/PDFXchangePro/update.ps1 index ca2c6b45..8a2387f1 100644 --- a/PDFXchangePro/update.ps1 +++ b/PDFXchangePro/update.ps1 @@ -21,8 +21,8 @@ function global:au_GetLatest { try { $response = Invoke-RestMethod -Uri "https://www.tracker-software.com/trackerupdate/TrackerData8.xml" - # Unfortunately, they're including a Byte Order Mark, so we have to trim that off - $xml = [xml] $response.Substring(3) + # Trim off any Byte Order Mark + $xml = [xml] $response.Trim([char] 0xFEFF, [char] 0x200B) $xmlNameSpace = new-object System.Xml.XmlNamespaceManager($xml.NameTable) $xmlNameSpace.AddNamespace("t", "http://schemas.tracker-software.com/trackerupdate/tb/v1")