RobertvanderHulst
Posts: 22
Joined: Wed Mar 04, 2009 4:09 pm

Installer fails to update XML with encoding Windows-1252

I got an error report from a customer, that the installer failed to update an XML file with the following encoding:

<?xml version="1.0" encoding="Windows-1252"?>


The error message is:

Code: Select all

Unsupported XML file encoding
The installer itself has a XML Declaration with encoding UTF-8.

I have worked around this for now by converting the file to UTF-8 for the customer.

I have attached a sample aip that updates a XML file in the root of the Windows volume as an example

Robert

Is this a known issue ?
Attachments
test.zip
(5.66 KiB) Downloaded 303 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Installer fails to update XML with encoding Windows-1252

Hi,

Please note that this error refers to the encoding of the file, not to the encoding declared in the first line. Advanced Installer supports only UTF-8, UTF-16, ASCII and ISO-8859-1 (Latin-1) encodings. I noticed that the XML you provided uses ANSI encoding. Please try encoding it as UTF-8 and let me know if the problem persists.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
RobertvanderHulst
Posts: 22
Joined: Wed Mar 04, 2009 4:09 pm

Re: Installer fails to update XML with encoding Windows-1252

cosmin wrote:Please note that this error refers to the encoding of the file, not to the encoding declared in the first line. Advanced Installer supports only UTF-8, UTF-16, ASCII and ISO-8859-1 (Latin-1) encodings. I noticed that the XML you provided uses ANSI encoding. Please try encoding it as UTF-8 and let me know if the problem persists.
I know that it refers to the encoding of the file.
Why doesn't AI support the Windows-1252 encoding?

FYI: I was not updating a file that was created with our product, but the machine.config on the end users machine. There is no way that I can control the encoding that is used inside this file...


Robert
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Installer fails to update XML with encoding Windows-1252

Hi,

I'm afraid that the Windows-1252 encoding is currently not supported by Advanced Installer. However, this improvement will be included in the next version (it will be released in a couple of weeks). Until then a workaround is to use a custom action to update the XML file.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
RobertvanderHulst
Posts: 22
Joined: Wed Mar 04, 2009 4:09 pm

Re: Installer fails to update XML with encoding Windows-1252

cosmin wrote:I'm afraid that the Windows-1252 encoding is currently not supported by Advanced Installer. However, this improvement will be included in the next version (it will be released in a couple of weeks). Until then a workaround is to use a custom action to update the XML file.
Can you be a little more specific?
Do you mean that I need to write some inline VB script for this ?

Robert
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Installer fails to update XML with encoding Windows-1252

Hi Robert,

You can use a VBScript or C++ DLL custom action. Please note that the User Guide contains the Write text into a file how-to which may help you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”