Wix toolset license agreement multi-languages issue

I have created license.rtf file which has multiple languages and when I try to build my wix project it shows me this error :

A string was provided with characters that are not available in the specified database code page '1252'. Either change these characters to ones that exist in the database's code page, or update the database's code page by modifying one of the following attributes: Product/@Codepage, Module/@Codepage, Patch/@Codepage, PatchCreation/@Codepage, or WixLocalization/@Codepage.

I have tried to add this attribute Codepage="1256" on Product tag it still showing the same error.

Could you please help me solving this issue?


This sounded quite mysterious. A quick search found this existing question: Wix string with characters not available in database 's codepage although codepage is set.

It seems there is a separate code page setting for the MSI's summary stream - Codepage Summary property - which is different from the package's main code page setting.

I noticed a code page setting referred to as "SI Codepage" when testing with InstEd (see down the page). I don't really see this codepage summary property in Orca. Perhaps it is there and I just don't see it.

  1. Maybe you are not setting this summary information stream code page properly, although you set the main package code page?

    • It looks like the summary information stream code page is set in the Package element and is not automatically overridden in the wxl localization file. This is probably a WiX bug.
    • I have done a manual override in the snippets below (SummaryCodepage="!(loc.SummaryCodepage)" - grabbing the value from the localization file via a localized string. Essentially you are doing the job yourself and that should work without a bug fix from the WiX guys for what you need. I hope - a new WiX release is heavy stuff).
  2. I also took out the CodePage attribute for the Product element in the main wxs source file to try to let the setting from the wxl localization file take effect. See the last link in the list of WiX bug database entries at the bottom.

  3. My gut feel is that "here be more dragons". Localization is very strange to deal with. How will this behave on a proper Japanese machine? I would like to know, please do test.


I threw together a quick mock-up, but have no time to test properly. Maybe have a quick test:

<Product Id="*" Name="!(loc.ApplicationName)" Language="!(loc.LanguageLcid)" Version="1.0.0" 
                Manufacturer="!(loc.ManufacturerName)" UpgradeCode="PUT-GUID-HERE">

  <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" 
           Languages="!(loc.LanguageLcid)" SummaryCodepage="!(loc.SummaryCodepage)" />

And here is the Japanese localization file (I have no idea what those Japanese characters state, I just copied and pasted something to get my testing done - UPDATE: OK, Google Translate to the rescue! No offensive language found!):

<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="ja-JP" Codepage="932" Language="1041" 
                 xmlns="http://schemas.microsoft.com/wix/2006/localization">
  <String Id="SummaryCodepage">932</String>
  <String Id="LanguageLcid">1041</String>
  <String Id="ApplicationName">各務原市農地支援・畑地管理システムインストーラー</String>
  <String Id="ManufacturerName">(株)テイコク</String>
</WixLocalization>

I put some Japanese characters into a single license agreement RTF I threw in there as well (I didn't set up proper localized include of different RTF files). The setup GUI looks OK - it shows up in Japanese, and the Japanese characters show up in the license agreement.

Please give it a go and see if your problem disappears. If not, maybe spend some time querying the WiX bug database.


WiX bug-tracker near hits:

  • Can't localize SummaryCodepage
  • Product@codepage is being overridden when you use WixUIExt