Skip to content

Commit

Permalink
GFF2XML: Add support for GFF4 files with big endian strings
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Aug 19, 2018
1 parent 7d4b295 commit e0251b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/gff2xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int main(int argc, char **argv) {
std::vector<Common::UString> args;
Common::Platform::getParameters(argc, argv, args);

Common::Encoding encoding = Common::kEncodingUTF16LE;
Common::Encoding encoding = Common::kEncodingInvalid;
Aurora::GameID game = Aurora::kGameIDUnknown;

EncodingOverrides encOverrides;
Expand Down
3 changes: 3 additions & 0 deletions src/xml/gff4dumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ void GFF4Dumper::dump(Common::WriteStream &output, Common::SeekableReadStream *i
_gff4.reset(new Aurora::GFF4File(input));
_xml.reset(new XMLWriter(output));

if (_encoding == Common::kEncodingInvalid)
_encoding = _gff4->getNativeEncoding();

_xml->openTag("gff4");
_xml->addProperty("type" , Common::tagToString(_gff4->getType() , true));
_xml->addProperty("version" , Common::tagToString(_gff4->getTypeVersion(), true));
Expand Down

0 comments on commit e0251b0

Please sign in to comment.