Actions
Bug #6372
closedUnable to parse Windows-1252 encoded XML files on Linux
Start date:
2024-03-15
Due date:
% Done:
0%
Estimated time:
Applies to branch:
Fix Committed on Branch:
12
Fixed in Maintenance Release:
Found in version:
12.4.2
Fixed in version:
12.5
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:
Description
From the forum (https://saxonica.plan.io/boards/4/topics/9617):
working with version 12.4.2 on Linux and having this simplified C++ code to explain what I do:
SaxonProcessor *processor = new SaxonProcessor(true); Xslt30Processor *trans = processor->newXslt30Processor(); XsltExecutable *executable = executable = trans->compileFromFile("/tmp/test.xsl"); executable->setInitialMatchSelectionAsFile("/tmp/file.xml"); const char *output = executable->applyTemplatesReturningString();
My file.xml header is like this:
<?xml version="1.0" encoding="windows-1252" standalone="no"?>
I get the following exception running my program:
SXXP0003 I/O error reported by XML parser processing file:///tmp/file1.xml. Caused by java.io.UnsupportedEncodingException: Cp1252
My Linux its locale is en_US.UTF-8. Using XML files with utf-8 or iso-8859-1 encodings all work fine.
The same program and input files with windows-1252 encoding on Windows work though. I face this problem only on Linux.
Files
Please register to edit this issue
Actions