public ProcessPropertiesCommand(IntermediateSection section, WixPackageSymbol packageSymbol, int fallbackLcid, bool populateDelayedVariables, IBackendHelper backendHelper)
 {
     this.Section                  = section;
     this.PackageSymbol            = packageSymbol;
     this.FallbackLcid             = fallbackLcid;
     this.PopulateDelayedVariables = populateDelayedVariables;
     this.BackendHelper            = backendHelper;
 }
        private int CalculateCodepage(WixPackageSymbol packageSymbol, WixModuleSymbol moduleSymbol, WixPatchSymbol patchSymbol)
        {
            var codepage = packageSymbol?.Codepage ?? moduleSymbol?.Codepage ?? patchSymbol?.Codepage;

            if (String.IsNullOrEmpty(codepage))
            {
                codepage = this.ResolvedCodepage?.ToString() ?? "65001";

                if (packageSymbol != null)
                {
                    packageSymbol.Codepage = codepage;
                }
                else if (moduleSymbol != null)
                {
                    moduleSymbol.Codepage = codepage;
                }
                else if (patchSymbol != null)
                {
                    patchSymbol.Codepage = codepage;
                }
            }

            return(this.WindowsInstallerBackendHelper.GetValidCodePage(codepage));
        }