Skip to content

src2srcml output encoding error causes XElement.Load to fail #85

@nkraft

Description

@nkraft

Given a filename such as "AKKDATA_1_AKKDATA_1 MENGDE_DÅ PG2_ExpressionVariable.cpp" src2srcml.exe version "Trunk 19109c Thu May 22 09:18:31 2014 -0400" writes the output file in encoding ISO-8859-1 but with an xml declaration that indicates UTF-8. The result is that XElement.Load, when passed a FileStream, throws an encoding-related exception. Passing the '-x "ISO-8859-1"' option to src2srcml.exe results in an empty output file.

Best solution: Fix src2srcml.exe.
Workaround for SrcML.NET: Wrap the FileStream in a StreamReader and pass that StreamReader to XElement.Load.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions