Wix string with characters not available in database 's codepage although codepage is set

后端 未结 2 733
后悔当初
后悔当初 2020-12-18 01:11

I have a Wix installer project in VS2012, which compiled just fine last time I used it (about a week ago). I went back today and get about 15 code page errors:



        
相关标签:
2条回答
  • 2020-12-18 01:34

    I had the same problem, but with a "è" char (which is include in CP-1252, so default culture should have worked) . Replacing it by "e" patch the problem but that was not a clean solution.

    What really work is adding a .wxl file codepage

    <?xml version="1.0" encoding="utf-8"?>
    <WixLocalization Codepage="utf-8" Culture="fr-ca" xmlns="http://schemas.microsoft.com/wix/2006/localization">
    </WixLocalization>
    

    also precising 1252 worked

    <?xml version="1.0" encoding="utf-8"?>
    <WixLocalization Codepage="1252" Culture="fr-ca" xmlns="http://schemas.microsoft.com/wix/2006/localization">
    </WixLocalization>
    

    Then you specify the culture to build according to Wix documentation "Specifying Cultures to Build". It need to be the same culture written in the .wxl file.

    enter image description here

    Building the project in VS2010 now work.

    EDIT: Just adding <Product Codepage="1252" into the .wxs file solved the problem too.

    0 讨论(0)
  • 2020-12-18 01:41

    If you are using .wxl files, those can override the codepage during the build. Ensure that your .wxl files all have the correct codepage set for the characters they are adding and that you don't end up mixing characters from different codepages with your product and strings localized from a .wxl file.

    Additionally, since you are using the WixUI those contain many .wxl files with codepages in them as well. In the WiX.chm there is a topic titled "Specifying Cultures to Build". That shows you how to set the codepages to build in Votive. Specifically, you'll want to add "ja-JP" (or other appropriate culture) to the Cultures to build: setting the Properties of your .wixproj. Otherwise, you're probably getting the default culture from the WixUI which is probably en-US and that would explain the 1252 workaround.

    0 讨论(0)
提交回复
热议问题