From 78e5e2d76d2e6b228c528af6478113486fb87719 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 28 Jun 2020 19:08:59 +0200 Subject: [PATCH 1/3] - Changed saving of Grandstream GXP / GXV phones exports to UTF-8 --- source/Form1.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Form1.cs b/source/Form1.cs index 9ed6cbe..8560ef3 100644 --- a/source/Form1.cs +++ b/source/Form1.cs @@ -3753,7 +3753,7 @@ private void save_data_GrandstreamGXV(string filename, System.Collections.Hashta resultSB.Append(""); // actually write the file to disk - System.IO.File.WriteAllText(filename, resultSB.ToString(), Encoding.GetEncoding("UTF-8")); + System.IO.File.WriteAllText(filename, resultSB.ToString(), Encoding.UTF8); // tell the user this has been done string errorwarning = ""; @@ -3771,7 +3771,7 @@ private void save_data_GrandstreamGXP(string filename, System.Collections.Hashta StringBuilder resultSB = new StringBuilder(); // write the header - resultSB.Append("\n\n"); + resultSB.Append("\n\n"); // initialize hashtable to store generated data results System.Collections.Hashtable MySaveDataHash = new System.Collections.Hashtable(); @@ -3834,7 +3834,7 @@ private void save_data_GrandstreamGXP(string filename, System.Collections.Hashta resultSB.Append("\n"); // actually write the file to disk - System.IO.File.WriteAllText(filename, resultSB.ToString(), Encoding.GetEncoding("ISO-8859-1")); + System.IO.File.WriteAllText(filename, resultSB.ToString(), Encoding.UTF8); // tell the user this has been done MessageBox.Show(MySaveDataHash.Count + " contacts written to " + filename + " !"); From 233b85017687093e784b1c9cbdefe866164f92a2 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 28 Jun 2020 19:36:37 +0200 Subject: [PATCH 2/3] + Added ILRepack to create final .exe including all .dlls * Updated build parameters * Fixed App Icon for build executable --- source/Contact-Conversion-Wizard.csproj | 43 +++++++++++++++++++++++++ source/Properties/AssemblyInfo.cs | 14 ++++---- source/packages.config | 1 + 3 files changed, 51 insertions(+), 7 deletions(-) diff --git a/source/Contact-Conversion-Wizard.csproj b/source/Contact-Conversion-Wizard.csproj index b2da5bf..b325326 100644 --- a/source/Contact-Conversion-Wizard.csproj +++ b/source/Contact-Conversion-Wizard.csproj @@ -1,5 +1,6 @@  + Debug @@ -11,6 +12,25 @@ v4.0 512 true + false + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + https://github.com/Rillke/Contact-Conversion-Wizard + Contact Conversion Wizard + 1 + 3.5.0.%2a + false + true AnyCPU @@ -31,6 +51,9 @@ prompt 4 + + CCW-Large.ico + packages\Google.GData.Client.2.2.0.0\lib\Google.GData.Client.dll @@ -123,5 +146,25 @@ Resources.Designer.cs + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + del Contact Conversion Wizard.exe +..\..\packages\ILRepack.2.0.18\tools\ILRepack.exe /out:"Contact Conversion Wizard.exe" Contact-Conversion-Wizard.exe Google.GData.Client.dll Google.GData.Contacts.dll Google.GData.Extensions.dll LumenWorks.Framework.IO.dll Newtonsoft.Json.dll + \ No newline at end of file diff --git a/source/Properties/AssemblyInfo.cs b/source/Properties/AssemblyInfo.cs index 3983347..fa0e611 100644 --- a/source/Properties/AssemblyInfo.cs +++ b/source/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Contact Conversion Wizard")] @@ -14,8 +14,8 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -25,12 +25,12 @@ // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.5.0.0")] -[assembly: AssemblyFileVersion("3.5.0.0")] +[assembly: AssemblyVersion("3.5.0.1")] +[assembly: AssemblyFileVersion("3.5.0.1")] diff --git a/source/packages.config b/source/packages.config index a9278b4..3b0ce2a 100644 --- a/source/packages.config +++ b/source/packages.config @@ -3,6 +3,7 @@ + \ No newline at end of file From 1be291ebf2180fa278fa463ab3a07d745c06812a Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 30 Jun 2020 11:08:00 +0200 Subject: [PATCH 3/3] * Changed Grandstream Export to save as UTF-8 without BOM --- source/Form1.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/Form1.cs b/source/Form1.cs index 8560ef3..f21ef6e 100644 --- a/source/Form1.cs +++ b/source/Form1.cs @@ -3752,8 +3752,11 @@ private void save_data_GrandstreamGXV(string filename, System.Collections.Hashta // write file footer. resultSB.Append(""); + // Set Encoding to UTF-8 without BOM + System.Text.Encoding encoding = new System.Text.UTF8Encoding(false); + // actually write the file to disk - System.IO.File.WriteAllText(filename, resultSB.ToString(), Encoding.UTF8); + System.IO.File.WriteAllText(filename, resultSB.ToString(), encoding); // tell the user this has been done string errorwarning = ""; @@ -3833,8 +3836,11 @@ private void save_data_GrandstreamGXP(string filename, System.Collections.Hashta // write file footer. resultSB.Append("\n"); + // Set Encoding to UTF-8 without BOM + System.Text.Encoding encoding = new System.Text.UTF8Encoding(false); + // actually write the file to disk - System.IO.File.WriteAllText(filename, resultSB.ToString(), Encoding.UTF8); + System.IO.File.WriteAllText(filename, resultSB.ToString(), encoding); // tell the user this has been done MessageBox.Show(MySaveDataHash.Count + " contacts written to " + filename + " !");