[wix-users] Installer Localization

Jason Groshart Jason.Groshart at enghouse.com
Tue May 9 08:09:05 PDT 2017


I need help with how to resolve a localization issue.  I have a product installer that creates and then installs a database.  We are using SqlScript to execute a complex SQL script that creates and fills in all the initial tables and data like so:

          <sql:SqlScript Id="dbInstallScript.NamedInstance.WindowsAuthentication"
                         ExecuteOnInstall="yes"
                         ExecuteOnUninstall="no"
                         ExecuteOnReinstall="yes"
                         BinaryKey="createDB.sql"
                         ContinueOnError="no" />

The SQL script includes an installation of the System Account Name, which varies based on local.  Some of these locations include special characters, for example:

       SET @sysAccountName = 'NT AUTHORITY\SYSTEM'

       IF (@defaultLanguage = 'Deutsch')
              SET @sysAccountName = 'NT-AUTORITÄT\SYSTEM'
       IF (@defaultLanguage = 'Français')
              SET @sysAccountName = 'AUTORITE NT\Système'


The special character in the German language SAN, Ä, has caused us some issue.  We get an error message where the character is displayed as either '�'or 'A,,'.  I recognize this as character encoding issues and I found some information that there is a known issue where WIX SqlScript does not support UTF-8 encoding.  This is supposed to be fixed in a 3.x version, but has not yet been resolved.  So, I saved the .sql script as full UTF and also updated the WIX xml encoding to utf-16 like so:



<?xml version="1.0" encoding="utf-16"?>



This resolved the issue on the German system that it was originally reported and we installed fine.  I thought we'd resolved the issue.  However, we try installing on a different German system and we again see the encoding issue with the error showing 'A,,'.  I've verified that the previous fixes are in place, but they are not working on this system.  I suspect that this is an issue caused by different systems and OS possibly related to endian issues.  Currently we don't set Codepage and I'm wondering if I need to do something with that, but I don't know if that makes a difference or how to set it.  The installer itself can be in English, so 1033 Language works for us, but I need the SQL script to properly recognize the special character.



Any help or advice you can provide on this issue would be welcome.  Thanks.

Jason


More information about the wix-users mailing list