From 4449fcc5b8d104817c67135229682c66c3d892ca Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 2 Apr 2021 14:41:49 -0700 Subject: Enable codepages and languages to be set via .wxl files Fixes wixtoolset/issues#5801 --- src/WixToolset.Core/CompilerCore.cs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/WixToolset.Core/CompilerCore.cs') diff --git a/src/WixToolset.Core/CompilerCore.cs b/src/WixToolset.Core/CompilerCore.cs index 0bc63d79..df532d74 100644 --- a/src/WixToolset.Core/CompilerCore.cs +++ b/src/WixToolset.Core/CompilerCore.cs @@ -680,7 +680,7 @@ namespace WixToolset.Core Debug.Assert(minimum > CompilerConstants.IntegerNotSet && minimum > CompilerConstants.IllegalInteger, "The legal values for this attribute collide with at least one sentinel used during parsing."); - string value = this.GetAttributeValue(sourceLineNumbers, attribute); + var value = this.GetAttributeValue(sourceLineNumbers, attribute); if (0 < value.Length) { @@ -692,7 +692,7 @@ namespace WixToolset.Core { try { - int integer = Convert.ToInt32(value, CultureInfo.InvariantCulture.NumberFormat); + var integer = Convert.ToInt32(value, CultureInfo.InvariantCulture.NumberFormat); if (CompilerConstants.IntegerNotSet == integer || CompilerConstants.IllegalInteger == integer) { @@ -1036,12 +1036,11 @@ namespace WixToolset.Core /// /// Unique identifier for the section. /// Type of section to create. - /// Codepage for the resulting database for this ection. - /// + /// Unique identifier for the compilation. /// New section. - internal IntermediateSection CreateActiveSection(string id, SectionType type, int codepage, string compilationId) + internal IntermediateSection CreateActiveSection(string id, SectionType type, string compilationId) { - this.ActiveSection = this.CreateSection(id, type, codepage, compilationId); + this.ActiveSection = this.CreateSection(id, type, compilationId); this.activeSectionCachedInlinedDirectoryIds = new Dictionary(); this.activeSectionSimpleReferences = new HashSet(); @@ -1054,12 +1053,11 @@ namespace WixToolset.Core /// /// Unique identifier for the section. /// Type of section to create. - /// Codepage for the resulting database for this ection. - /// + /// Unique identifier for the compilation. /// New section. - internal IntermediateSection CreateSection(string id, SectionType type, int codepage, string compilationId) + internal IntermediateSection CreateSection(string id, SectionType type, string compilationId) { - var section = new IntermediateSection(id, type, codepage, compilationId); + var section = new IntermediateSection(id, type, compilationId); this.intermediate.Sections.Add(section); -- cgit v1.2.3-55-g6feb