diff --git a/BarcodeStandard/BarcodeCommon.cs b/BarcodeStandard/BarcodeCommon.cs index 2269b7f..c06b7d9 100644 --- a/BarcodeStandard/BarcodeCommon.cs +++ b/BarcodeStandard/BarcodeCommon.cs @@ -19,15 +19,15 @@ public List Errors get { return this._Errors; } } - public void Error(string ErrorMessage) + public void Error(string errorMessage) { - this._Errors.Add(ErrorMessage); - throw new Exception(ErrorMessage); + this._Errors.Add(errorMessage); + throw new Exception(errorMessage); } - internal static bool CheckNumericOnly(string Data) + internal static bool CheckNumericOnly(string data) { - return Regex.IsMatch(Data, @"^\d+$", RegexOptions.Compiled); + return Regex.IsMatch(data, @"^\d+$", RegexOptions.Compiled); } }//BarcodeVariables abstract class }//namespace diff --git a/BarcodeStandard/BarcodeStandard.csproj b/BarcodeStandard/BarcodeStandard.csproj index a07a8d9..28b8d52 100644 --- a/BarcodeStandard/BarcodeStandard.csproj +++ b/BarcodeStandard/BarcodeStandard.csproj @@ -3,13 +3,13 @@ netstandard2.0 true - 2.2.8 + 2.2.10 BarcodeLib Pnuema Productions BarcodeLib Brad Barnhill This library was designed to give an easy class for developers to use when they need to generate barcode images from a string of data. - Copyright 2007-2020 Brad Barnhill + Copyright 2007-2021 Brad Barnhill https://github.com/barnhill/barcodelib https://github.com/barnhill/barcodelib.git git @@ -19,6 +19,8 @@ LICENSE.txt upca.jpg + 2.2.10.0 + 2.2.10.0 diff --git a/BarcodeStandard/Release Notes.txt b/BarcodeStandard/Release Notes.txt index b58b9a9..818df73 100644 --- a/BarcodeStandard/Release Notes.txt +++ b/BarcodeStandard/Release Notes.txt @@ -1,5 +1,9 @@ Release Notes for BarcodeLib.dll ================================ +2.2.10.0 +- Fix Standard 2 of 5 encoding bug +2.2.9.0 +- Fix Interleaved 2 of 5 encoding bug 2.2.8.0 - Fix Standard 2 of 5 checksum calculation 2.2.7.0 diff --git a/BarcodeStandard/Symbologies/Standard2of5.cs b/BarcodeStandard/Symbologies/Standard2of5.cs index 28513d8..8e9d38f 100644 --- a/BarcodeStandard/Symbologies/Standard2of5.cs +++ b/BarcodeStandard/Symbologies/Standard2of5.cs @@ -27,10 +27,10 @@ private string Encode_Standard2of5() var result = "11011010"; - foreach (var c in Raw_Data) + for (int i = 0; i < Raw_Data.Length; i++) { - result += S25_Code[Int32.Parse(c.ToString())]; - }//foreach + result += S25_Code[(int)char.GetNumericValue(Raw_Data, i)]; + } result += _encodedType == TYPE.Standard2of5_Mod10 ? S25_Code[CalculateMod10CheckDigit()] : "";